Cython: corecext.pyx

Generated by Cython 3.0.11

Yellow lines hint at Python interaction.
Click on a line that starts with a "`+`" to see the C code that Cython generated for it.

Raw output: corecext.c

    +0001: # Copyright (c) 2009-2012 Denis Bilenko. See LICENSE for details.

      __pyx_t_18 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_18) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

     0002:

     0003: # This first directive, supported in Cython 0.24+, causes sources

     0004: # files to be *much* smaller when it's false (139,027 LOC vs 35,000

     0005: # LOC) and thus cythonpp.py (and probably the compiler; also Visual C

     0006: # has limits on source file sizes) to be faster (73s vs 46s). But it does

     0007: # make debugging more difficult. Auto-pickling was added in 0.26, and

     0008: # that's a new feature that we don't need or want to allow in a gevent

     0009: # point release.

     0010:

     0011: # cython: emit_code_comments=False, auto_pickle=False, language_level=3str

     0012:

     0013: # NOTE: We generally cannot use the Cython IF directive as documented

     0014: # at

     0015: # http://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#conditional-compilation

     0016: # (e.g., IF UNAME_SYSNAME == "Windows") because when Cython says

     0017: # "compilation", it means when *Cython* compiles, not when the C

     0018: # compiler compiles. We distribute an sdist with a single pre-compiled

     0019: # C file for all platforms so that end users that don't use a binary

     0020: # wheel don't have to sit through cythonpp and other steps the Makefile does.

     0021: # See https://github.com/gevent/gevent/issues/1076

     0022: # We compile in 3str mode, which should mean we get absolute import

     0023: # by default.

     0024: from __future__ import absolute_import

     0025:

     0026: cimport cython

     0027: cimport libev

     0028:

     0029: from cpython.ref cimport Py_INCREF

     0030: from cpython.ref cimport Py_DECREF

     0031: from cpython.mem cimport PyMem_Malloc

     0032: from cpython.mem cimport PyMem_Free

     0033: from cpython.object cimport PyObject

     0034: from cpython.exc cimport PyErr_NormalizeException

     0035: from cpython.exc cimport PyErr_WriteUnraisable

     0036: from libc.errno cimport errno

     0037: from cpython cimport PyErr_Fetch

     0038: from cpython cimport PyErr_Occurred

     0039: from cpython cimport PyObject

     0040: from cpython cimport PyErr_Clear

     0041:

     0042: cdef extern from "Python.h":

     0043:     int    Py_ReprEnter(object)

     0044:     void   Py_ReprLeave(object)

     0045:

     0046:     int PyException_SetTraceback(PyObject* ex, PyObject* tb) except *

     0047:

    +0048: import sys

      __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0049: import os

      __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0050: import traceback

      __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_traceback, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0051: import signal as signalmodule

      __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_signal, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_signalmodule, __pyx_t_2) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0052: from gevent import getswitchinterval

      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_n_s_getswitchinterval);
      __Pyx_GIVEREF(__pyx_n_s_getswitchinterval);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_getswitchinterval)) __PYX_ERR(0, 52, __pyx_L1_error);
      __pyx_t_3 = __Pyx_Import(__pyx_n_s_gevent, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_getswitchinterval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_getswitchinterval, __pyx_t_2) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0053: from gevent.exceptions import HubDestroyed

      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_HubDestroyed);
      __Pyx_GIVEREF(__pyx_n_s_HubDestroyed);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_HubDestroyed)) __PYX_ERR(0, 53, __pyx_L1_error);
      __pyx_t_2 = __Pyx_Import(__pyx_n_s_gevent_exceptions, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_HubDestroyed); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_HubDestroyed, __pyx_t_3) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     0054:

     0055:

    +0056: __all__ = ['get_version',

      __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_n_s_get_version);
      __Pyx_GIVEREF(__pyx_n_s_get_version);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_version)) __PYX_ERR(0, 56, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_get_header_version);
      __Pyx_GIVEREF(__pyx_n_s_get_header_version);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_get_header_version)) __PYX_ERR(0, 56, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_supported_backends);
      __Pyx_GIVEREF(__pyx_n_s_supported_backends);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_supported_backends)) __PYX_ERR(0, 56, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_recommended_backends);
      __Pyx_GIVEREF(__pyx_n_s_recommended_backends);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_recommended_backends)) __PYX_ERR(0, 56, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_embeddable_backends);
      __Pyx_GIVEREF(__pyx_n_s_embeddable_backends);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_embeddable_backends)) __PYX_ERR(0, 56, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_time);
      __Pyx_GIVEREF(__pyx_n_s_time);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_time)) __PYX_ERR(0, 56, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_loop);
      __Pyx_GIVEREF(__pyx_n_s_loop);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_loop)) __PYX_ERR(0, 56, __pyx_L1_error);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_2) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     0057:            'get_header_version',

     0058:            'supported_backends',

     0059:            'recommended_backends',

     0060:            'embeddable_backends',

     0061:            'time',

     0062:            'loop']

     0063:

     0064: cdef tuple integer_types

     0065:

    +0066: if sys.version_info[0] >= 3:

      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_4) {

        goto __pyx_L2;
      }

    +0067:     integer_types = int,

        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF((PyObject *)(&PyInt_Type));
        __Pyx_GIVEREF((PyObject *)(&PyInt_Type));
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 67, __pyx_L1_error);
        __Pyx_XGOTREF(__pyx_v_6gevent_5libev_8corecext_integer_types);
        __Pyx_DECREF_SET(__pyx_v_6gevent_5libev_8corecext_integer_types, ((PyObject*)__pyx_t_3));
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;

     0068: else:

    +0069:     integer_types = (int, long)

      /*else*/ {
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF((PyObject *)(&PyInt_Type));
        __Pyx_GIVEREF((PyObject *)(&PyInt_Type));
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 69, __pyx_L1_error);
        __Pyx_INCREF((PyObject *)(&PyLong_Type));
        __Pyx_GIVEREF((PyObject *)(&PyLong_Type));
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)(&PyLong_Type)))) __PYX_ERR(0, 69, __pyx_L1_error);
        __Pyx_XGOTREF(__pyx_v_6gevent_5libev_8corecext_integer_types);
        __Pyx_DECREF_SET(__pyx_v_6gevent_5libev_8corecext_integer_types, ((PyObject*)__pyx_t_3));
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;
      }
      __pyx_L2:;

     0070:

     0071:

     0072: cdef extern from "callbacks.h":

     0073:     void gevent_callback_io(libev.ev_loop, void*, int)

     0074:     void gevent_callback_timer(libev.ev_loop, void*, int)

     0075:     void gevent_callback_signal(libev.ev_loop, void*, int)

     0076:     void gevent_callback_idle(libev.ev_loop, void*, int)

     0077:     void gevent_callback_prepare(libev.ev_loop, void*, int)

     0078:     void gevent_callback_check(libev.ev_loop, void*, int)

     0079:     void gevent_callback_fork(libev.ev_loop, void*, int)

     0080:     void gevent_callback_async(libev.ev_loop, void*, int)

     0081:     void gevent_callback_child(libev.ev_loop, void*, int)

     0082:     void gevent_callback_stat(libev.ev_loop, void*, int)

     0083:     void gevent_run_callbacks(libev.ev_loop, void*, int)

     0084:     void gevent_periodic_signal_check(libev.ev_loop, void*, int)

     0085:     void gevent_call(loop, callback)

     0086:     void gevent_noop(libev.ev_loop, void*, int)

     0087:     void* gevent_realloc(void*, long size)

     0088:

     0089: cdef extern from "stathelper.c":

     0090:     object _pystat_fromstructstat(void*)

     0091:

     0092:

    +0093: UNDEF = libev.EV_UNDEF

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_UNDEF); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNDEF, __pyx_t_3) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0094: NONE = libev.EV_NONE

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_NONE, __pyx_t_3) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0095: READ = libev.EV_READ

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_READ); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_READ, __pyx_t_3) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0096: WRITE = libev.EV_WRITE

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_WRITE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_WRITE, __pyx_t_3) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0097: TIMER = libev.EV_TIMER

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_TIMER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_TIMER, __pyx_t_3) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0098: PERIODIC = libev.EV_PERIODIC

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_PERIODIC); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_PERIODIC, __pyx_t_3) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0099: SIGNAL = libev.EV_SIGNAL

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_SIGNAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIGNAL, __pyx_t_3) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0100: CHILD = libev.EV_CHILD

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_CHILD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_CHILD, __pyx_t_3) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0101: STAT = libev.EV_STAT

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_STAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_STAT, __pyx_t_3) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0102: IDLE = libev.EV_IDLE

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_IDLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_IDLE, __pyx_t_3) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0103: PREPARE = libev.EV_PREPARE

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_PREPARE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_PREPARE, __pyx_t_3) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0104: CHECK = libev.EV_CHECK

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_CHECK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_CHECK, __pyx_t_3) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0105: EMBED = libev.EV_EMBED

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_EMBED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_EMBED, __pyx_t_3) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0106: FORK = libev.EV_FORK

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_FORK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORK, __pyx_t_3) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0107: CLEANUP = libev.EV_CLEANUP

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_CLEANUP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_CLEANUP, __pyx_t_3) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0108: ASYNC = libev.EV_ASYNC

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_ASYNC); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 108, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_ASYNC, __pyx_t_3) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0109: CUSTOM = libev.EV_CUSTOM

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_CUSTOM); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUSTOM, __pyx_t_3) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0110: ERROR = libev.EV_ERROR

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_ERROR); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR, __pyx_t_3) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0111:

    +0112: READWRITE = libev.EV_READ | libev.EV_WRITE

      __pyx_t_3 = __Pyx_PyInt_From_int((EV_READ | EV_WRITE)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_READWRITE, __pyx_t_3) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0113:

    +0114: MINPRI = libev.EV_MINPRI

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_MINPRI); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINPRI, __pyx_t_3) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0115: MAXPRI = libev.EV_MAXPRI

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_MAXPRI); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAXPRI, __pyx_t_3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0116:

    +0117: BACKEND_SELECT = libev.EVBACKEND_SELECT

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_SELECT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_SELECT, __pyx_t_3) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0118: BACKEND_POLL = libev.EVBACKEND_POLL

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_POLL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_POLL, __pyx_t_3) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0119: BACKEND_EPOLL = libev.EVBACKEND_EPOLL

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_EPOLL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_EPOLL, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0120: BACKEND_KQUEUE = libev.EVBACKEND_KQUEUE

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_KQUEUE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_KQUEUE, __pyx_t_3) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0121: BACKEND_DEVPOLL = libev.EVBACKEND_DEVPOLL

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_DEVPOLL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_DEVPOLL, __pyx_t_3) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0122: BACKEND_PORT = libev.EVBACKEND_PORT

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_PORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_PORT, __pyx_t_3) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0123: BACKEND_LINUXAIO = libev.EVBACKEND_LINUXAIO

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_LINUXAIO); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_LINUXAIO, __pyx_t_3) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0124: BACKEND_IOURING = libev.EVBACKEND_IOURING

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_IOURING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_IOURING, __pyx_t_3) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0125:

     0126:

    +0127: FORKCHECK = libev.EVFLAG_FORKCHECK

      __pyx_t_3 = __Pyx_PyInt_From_int(EVFLAG_FORKCHECK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORKCHECK, __pyx_t_3) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0128: NOINOTIFY = libev.EVFLAG_NOINOTIFY

      __pyx_t_3 = __Pyx_PyInt_From_int(EVFLAG_NOINOTIFY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOINOTIFY, __pyx_t_3) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0129: SIGNALFD = libev.EVFLAG_SIGNALFD

      __pyx_t_3 = __Pyx_PyInt_From_int(EVFLAG_SIGNALFD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIGNALFD, __pyx_t_3) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0130: NOSIGMASK = libev.EVFLAG_NOSIGMASK

      __pyx_t_3 = __Pyx_PyInt_From_int(EVFLAG_NOSIGMASK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOSIGMASK, __pyx_t_3) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0131:

     0132:

     0133: @cython.internal

    +0134: cdef class _EVENTSType:

    struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType {
      PyObject_HEAD
    };

     0135:

    +0136:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_EVENTSType_1__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_EVENTSType_1__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_11_EVENTSType___repr__(((struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_11_EVENTSType___repr__(CYTHON_UNUSED struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0137:         return 'gevent.core.EVENTS'

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_kp_s_gevent_core_EVENTS);
      __pyx_r = __pyx_kp_s_gevent_core_EVENTS;
      goto __pyx_L0;

     0138:

     0139:

    +0140: cdef public object GEVENT_CORE_EVENTS = _EVENTSType()

      __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext__EVENTSType)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XGOTREF(GEVENT_CORE_EVENTS);
      __Pyx_DECREF_SET(GEVENT_CORE_EVENTS, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;

    +0141: EVENTS = GEVENT_CORE_EVENTS

      if (PyDict_SetItem(__pyx_d, __pyx_n_s_EVENTS, GEVENT_CORE_EVENTS) < 0) __PYX_ERR(0, 141, __pyx_L1_error)

     0142:

     0143:

    +0144: def get_version():

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_1get_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_1get_version = {"get_version", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_1get_version, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_1get_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("get_version (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_get_version(__pyx_self);

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_get_version(CYTHON_UNUSED PyObject *__pyx_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.get_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_1get_version, 0, __pyx_n_s_get_version, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_version, __pyx_t_3) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(0, 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_src_gevent_libev_corecext_pyx, __pyx_n_s_get_version, 144, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 144, __pyx_L1_error)

    +0145:     return 'libev-%d.%02d' % (libev.ev_version_major(), libev.ev_version_minor())

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_int(ev_version_major()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyInt_From_int(ev_version_minor()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_libev_d_02d, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0146:

     0147:

    +0148: def get_header_version():

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_3get_header_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_3get_header_version = {"get_header_version", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_3get_header_version, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_3get_header_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("get_header_version (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2get_header_version(__pyx_self);

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_2get_header_version(CYTHON_UNUSED PyObject *__pyx_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.get_header_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_3get_header_version, 0, __pyx_n_s_get_header_version, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_header_version, __pyx_t_3) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(0, 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_src_gevent_libev_corecext_pyx, __pyx_n_s_get_header_version, 148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 148, __pyx_L1_error)

    +0149:     return 'libev-%d.%02d' % (libev.EV_VERSION_MAJOR, libev.EV_VERSION_MINOR)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_int(EV_VERSION_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyInt_From_int(EV_VERSION_MINOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_libev_d_02d, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0150:

     0151:

     0152: # This list backends in the order they are actually tried by libev,

     0153: # as defined in loop_init. The names must be lower case.

    +0154: _flags = [

      __pyx_t_3 = PyList_New(12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(0, 154, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_6)) __PYX_ERR(0, 154, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_t_7)) __PYX_ERR(0, 154, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_t_8)) __PYX_ERR(0, 154, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_9);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_t_9)) __PYX_ERR(0, 154, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_10);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 6, __pyx_t_10)) __PYX_ERR(0, 154, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_11);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 7, __pyx_t_11)) __PYX_ERR(0, 154, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_12);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 8, __pyx_t_12)) __PYX_ERR(0, 154, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_13);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 9, __pyx_t_13)) __PYX_ERR(0, 154, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_14);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 10, __pyx_t_14)) __PYX_ERR(0, 154, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_15);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 11, __pyx_t_15)) __PYX_ERR(0, 154, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_5 = 0;
      __pyx_t_6 = 0;
      __pyx_t_7 = 0;
      __pyx_t_8 = 0;
      __pyx_t_9 = 0;
      __pyx_t_10 = 0;
      __pyx_t_11 = 0;
      __pyx_t_12 = 0;
      __pyx_t_13 = 0;
      __pyx_t_14 = 0;
      __pyx_t_15 = 0;
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_flags, __pyx_t_3) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0155:     # IOCP

    +0156:     (libev.EVBACKEND_PORT, 'port'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_PORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_port);
      __Pyx_GIVEREF(__pyx_n_s_port);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_port)) __PYX_ERR(0, 156, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0157:     (libev.EVBACKEND_KQUEUE, 'kqueue'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_KQUEUE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_kqueue);
      __Pyx_GIVEREF(__pyx_n_s_kqueue);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_kqueue)) __PYX_ERR(0, 157, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0158:     (libev.EVBACKEND_IOURING, 'linux_iouring'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_IOURING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_linux_iouring);
      __Pyx_GIVEREF(__pyx_n_s_linux_iouring);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_linux_iouring)) __PYX_ERR(0, 158, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0159:     (libev.EVBACKEND_LINUXAIO, "linux_aio"),

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_LINUXAIO); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_linux_aio);
      __Pyx_GIVEREF(__pyx_n_s_linux_aio);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_linux_aio)) __PYX_ERR(0, 159, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0160:     (libev.EVBACKEND_EPOLL, 'epoll'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_EPOLL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_epoll);
      __Pyx_GIVEREF(__pyx_n_s_epoll);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_epoll)) __PYX_ERR(0, 160, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0161:     (libev.EVBACKEND_POLL, 'poll'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_POLL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_poll);
      __Pyx_GIVEREF(__pyx_n_s_poll);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_n_s_poll)) __PYX_ERR(0, 161, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0162:     (libev.EVBACKEND_SELECT, 'select'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EVBACKEND_SELECT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 162, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_select);
      __Pyx_GIVEREF(__pyx_n_s_select);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_select)) __PYX_ERR(0, 162, __pyx_L1_error);
      __pyx_t_3 = 0;

     0163:

    +0164:     (libev.EVFLAG_NOENV, 'noenv'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EVFLAG_NOENV); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 164, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_noenv);
      __Pyx_GIVEREF(__pyx_n_s_noenv);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_n_s_noenv)) __PYX_ERR(0, 164, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0165:     (libev.EVFLAG_FORKCHECK, 'forkcheck'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EVFLAG_FORKCHECK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_forkcheck);
      __Pyx_GIVEREF(__pyx_n_s_forkcheck);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_n_s_forkcheck)) __PYX_ERR(0, 165, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0166:     (libev.EVFLAG_NOINOTIFY, 'noinotify'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EVFLAG_NOINOTIFY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_noinotify);
      __Pyx_GIVEREF(__pyx_n_s_noinotify);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_noinotify)) __PYX_ERR(0, 166, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0167:     (libev.EVFLAG_SIGNALFD, 'signalfd'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EVFLAG_SIGNALFD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_signalfd);
      __Pyx_GIVEREF(__pyx_n_s_signalfd);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_n_s_signalfd)) __PYX_ERR(0, 167, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0168:     (libev.EVFLAG_NOSIGMASK, 'nosigmask')

      __pyx_t_3 = __Pyx_PyInt_From_int(EVFLAG_NOSIGMASK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_nosigmask);
      __Pyx_GIVEREF(__pyx_n_s_nosigmask);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_n_s_nosigmask)) __PYX_ERR(0, 168, __pyx_L1_error);
      __pyx_t_3 = 0;

     0169: ]

     0170:

     0171:

    +0172: _flags_str2int = dict((string, flag) for (flag, string) in _flags)

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_22genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
      struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *__pyx_cur_scope;
      PyObject *__pyx_r = NULL;
      __pyx_cur_scope = (struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *)__pyx_tp_new_6gevent_5libev_8corecext___pyx_scope_struct__genexpr(__pyx_ptype_6gevent_5libev_8corecext___pyx_scope_struct__genexpr, __pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(0, 172, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
      __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
      __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
      {
        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6gevent_5libev_8corecext_24generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_gevent_libev_corecext); if (unlikely(!gen)) __PYX_ERR(0, 172, __pyx_L1_error)
        __Pyx_DECREF(__pyx_cur_scope);
        __Pyx_RefNannyFinishContext();
        return (PyObject *) gen;
      }

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_gb_6gevent_5libev_8corecext_24generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
    {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("genexpr", 0);
      __pyx_L3_first_run:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 172, __pyx_L1_error)
      __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_r);
      if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 172, __pyx_L1_error) }
      if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
        __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_3 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_3)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 172, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __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(0, 172, __pyx_L1_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 172, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 172, __pyx_L1_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 172, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
          PyObject* sequence = __pyx_t_4;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 172, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
          } else {
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
            __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
          }
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 172, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 172, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 172, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
          index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 172, __pyx_L1_error)
          __pyx_t_8 = NULL;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L7_unpacking_done;
          __pyx_L6_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_8 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 172, __pyx_L1_error)
          __pyx_L7_unpacking_done:;
        }
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_flag);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_flag, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_string);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_string, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        __pyx_t_6 = 0;
        if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_string, (PyObject*)__pyx_cur_scope->__pyx_v_flag))) __PYX_ERR(0, 172, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
      __Pyx_Generator_Replace_StopIteration(0);
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      #if !CYTHON_USE_EXC_INFO_STACK
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      #endif
      __pyx_generator->resume_label = -1;
      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    PyObject *GEVENT_CORE_EVENTS = 0;
    PyObject *_empty_tuple = 0;

      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_15 = __pyx_pf_6gevent_5libev_8corecext_22genexpr(NULL, __pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_flags_str2int, __pyx_t_3) < 0) __PYX_ERR(0, 172, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr {
      PyObject_HEAD
      PyObject *__pyx_genexpr_arg_0;
      PyObject *__pyx_v_flag;
      PyObject *__pyx_v_string;
    };

     0173:

     0174:

    +0175: _events = [(libev.EV_READ,     'READ'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_READ); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_READ);
      __Pyx_GIVEREF(__pyx_n_s_READ);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_n_s_READ)) __PYX_ERR(0, 175, __pyx_L1_error);
      __pyx_t_3 = 0;

      __pyx_t_3 = PyList_New(16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_15);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_15)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_14);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_14)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_13);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_13)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_12);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_t_12)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_11);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_t_11)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_10);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_t_10)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_9);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 6, __pyx_t_9)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 7, __pyx_t_8)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 8, __pyx_t_7)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 9, __pyx_t_6)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 10, __pyx_t_5)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 11, __pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_16);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 12, __pyx_t_16)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_17);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 13, __pyx_t_17)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_18);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 14, __pyx_t_18)) __PYX_ERR(0, 175, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_19);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 15, __pyx_t_19)) __PYX_ERR(0, 175, __pyx_L1_error);
      __pyx_t_15 = 0;
      __pyx_t_14 = 0;
      __pyx_t_13 = 0;
      __pyx_t_12 = 0;
      __pyx_t_11 = 0;
      __pyx_t_10 = 0;
      __pyx_t_9 = 0;
      __pyx_t_8 = 0;
      __pyx_t_7 = 0;
      __pyx_t_6 = 0;
      __pyx_t_5 = 0;
      __pyx_t_2 = 0;
      __pyx_t_16 = 0;
      __pyx_t_17 = 0;
      __pyx_t_18 = 0;
      __pyx_t_19 = 0;
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_events, __pyx_t_3) < 0) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0176:            (libev.EV_WRITE,    'WRITE'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_WRITE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_WRITE);
      __Pyx_GIVEREF(__pyx_n_s_WRITE);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_n_s_WRITE)) __PYX_ERR(0, 176, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0177:            (libev.EV__IOFDSET, '_IOFDSET'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV__IOFDSET); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_IOFDSET);
      __Pyx_GIVEREF(__pyx_n_s_IOFDSET);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_IOFDSET)) __PYX_ERR(0, 177, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0178:            (libev.EV_PERIODIC, 'PERIODIC'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_PERIODIC); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_PERIODIC);
      __Pyx_GIVEREF(__pyx_n_s_PERIODIC);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_n_s_PERIODIC)) __PYX_ERR(0, 178, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0179:            (libev.EV_SIGNAL,   'SIGNAL'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_SIGNAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_SIGNAL);
      __Pyx_GIVEREF(__pyx_n_s_SIGNAL);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_n_s_SIGNAL)) __PYX_ERR(0, 179, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0180:            (libev.EV_CHILD,    'CHILD'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_CHILD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_CHILD);
      __Pyx_GIVEREF(__pyx_n_s_CHILD);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_CHILD)) __PYX_ERR(0, 180, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0181:            (libev.EV_STAT,     'STAT'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_STAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_STAT);
      __Pyx_GIVEREF(__pyx_n_s_STAT);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_n_s_STAT)) __PYX_ERR(0, 181, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0182:            (libev.EV_IDLE,     'IDLE'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_IDLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_IDLE);
      __Pyx_GIVEREF(__pyx_n_s_IDLE);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_IDLE)) __PYX_ERR(0, 182, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0183:            (libev.EV_PREPARE,  'PREPARE'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_PREPARE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_PREPARE);
      __Pyx_GIVEREF(__pyx_n_s_PREPARE);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_PREPARE)) __PYX_ERR(0, 183, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0184:            (libev.EV_CHECK,    'CHECK'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_CHECK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_CHECK);
      __Pyx_GIVEREF(__pyx_n_s_CHECK);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_CHECK)) __PYX_ERR(0, 184, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0185:            (libev.EV_EMBED,    'EMBED'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_EMBED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_EMBED);
      __Pyx_GIVEREF(__pyx_n_s_EMBED);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_EMBED)) __PYX_ERR(0, 185, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0186:            (libev.EV_FORK,     'FORK'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_FORK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_FORK);
      __Pyx_GIVEREF(__pyx_n_s_FORK);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_FORK)) __PYX_ERR(0, 186, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0187:            (libev.EV_CLEANUP,  'CLEANUP'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_CLEANUP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_CLEANUP);
      __Pyx_GIVEREF(__pyx_n_s_CLEANUP);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_n_s_CLEANUP)) __PYX_ERR(0, 187, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0188:            (libev.EV_ASYNC,    'ASYNC'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_ASYNC); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_ASYNC);
      __Pyx_GIVEREF(__pyx_n_s_ASYNC);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_n_s_ASYNC)) __PYX_ERR(0, 188, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0189:            (libev.EV_CUSTOM,   'CUSTOM'),

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_CUSTOM); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_CUSTOM);
      __Pyx_GIVEREF(__pyx_n_s_CUSTOM);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_n_s_CUSTOM)) __PYX_ERR(0, 189, __pyx_L1_error);
      __pyx_t_3 = 0;

    +0190:            (libev.EV_ERROR,    'ERROR')]

      __pyx_t_3 = __Pyx_PyInt_From_int(EV_ERROR); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_ERROR);
      __Pyx_GIVEREF(__pyx_n_s_ERROR);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_n_s_ERROR)) __PYX_ERR(0, 190, __pyx_L1_error);
      __pyx_t_3 = 0;

     0191:

     0192:

    +0193: cpdef _flags_to_list(unsigned int flags):

    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
    static PyObject *__pyx_f_6gevent_5libev_8corecext__flags_to_list(unsigned int __pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyObject *__pyx_v_result = 0;
      PyObject *__pyx_v_code = NULL;
      PyObject *__pyx_v_value = NULL;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("gevent.libev.corecext._flags_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_code);
      __Pyx_XDECREF(__pyx_v_value);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_5_flags_to_list = {"_flags_to_list", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list(PyObject *__pyx_self, PyObject *__pyx_arg_flags) {
      unsigned int __pyx_v_flags;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_flags_to_list (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      assert(__pyx_arg_flags); {
        __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 193, __pyx_L3_error)
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      __Pyx_AddTraceback("gevent.libev.corecext._flags_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4_flags_to_list(__pyx_self, ((unsigned int)__pyx_v_flags));
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4_flags_to_list(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(__pyx_v_flags, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext._flags_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__21 = PyTuple_Pack(2, __pyx_n_s_flags_2, __pyx_n_s_flags_2); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__21);
      __Pyx_GIVEREF(__pyx_tuple__21);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_5_flags_to_list, 0, __pyx_n_s_flags_to_list, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_flags_to_list, __pyx_t_3) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_flags_to_list, 193, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 193, __pyx_L1_error)

    +0194:     cdef list result = []

      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_result = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

    +0195:     for code, value in _flags:

      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = 0;
        __pyx_t_4 = NULL;
      } else {
        __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_4)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 195, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 195, __pyx_L1_error)
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 195, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 195, __pyx_L1_error)
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          }
        } else {
          __pyx_t_1 = __pyx_t_4(__pyx_t_2);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 195, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 195, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
          } else {
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
            __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
          }
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
          index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 195, __pyx_L1_error)
          __pyx_t_8 = NULL;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L6_unpacking_done;
          __pyx_L5_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_8 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 195, __pyx_L1_error)
          __pyx_L6_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
        __pyx_t_6 = 0;

      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L9_for_end;
      __pyx_L4_break:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L9_for_end;
      __pyx_L9_for_end:;

    +0196:         if flags & code:

        __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyNumber_And(__pyx_t_1, __pyx_v_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 196, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 196, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_9) {

        }

    +0197:             result.append(value)

          __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_value); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 197, __pyx_L1_error)

    +0198:         flags &= ~code

        __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 198, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = PyNumber_Invert(__pyx_v_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = PyNumber_InPlaceAnd(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_flags = __pyx_t_11;

    +0199:         if not flags:

        __pyx_t_9 = (!(__pyx_v_flags != 0));
        if (__pyx_t_9) {

        }

    +0200:             break

          goto __pyx_L4_break;

    +0201:     if flags:

      __pyx_t_9 = (__pyx_v_flags != 0);
      if (__pyx_t_9) {

      }

    +0202:         result.append(flags)

        __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 202, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0203:     return result

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

     0204:

     0205:

     0206:

    +0207: basestring = (bytes, str)

      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF((PyObject *)(&PyBytes_Type));
      __Pyx_GIVEREF((PyObject *)(&PyBytes_Type));
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyBytes_Type)))) __PYX_ERR(0, 207, __pyx_L1_error);
      __Pyx_INCREF((PyObject *)(&PyString_Type));
      __Pyx_GIVEREF((PyObject *)(&PyString_Type));
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)(&PyString_Type)))) __PYX_ERR(0, 207, __pyx_L1_error);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_basestring, __pyx_t_3) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0208:

     0209:

     0210:

    +0211: cpdef unsigned int _flags_to_int(object flags) except? -1:

    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int(PyObject *__pyx_self, PyObject *__pyx_v_flags); /*proto*/
    static unsigned int __pyx_f_6gevent_5libev_8corecext__flags_to_int(PyObject *__pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) {
      unsigned int __pyx_v_result;
      PyObject *__pyx_v_value = NULL;
      PyObject *__pyx_v_ex = NULL;
      unsigned int __pyx_r;
      __Pyx_INCREF(__pyx_v_flags);

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_15);
      __Pyx_XDECREF(__pyx_t_16);
      __Pyx_AddTraceback("gevent.libev.corecext._flags_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_value);
      __Pyx_XDECREF(__pyx_v_ex);
      __Pyx_XDECREF(__pyx_v_flags);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int(PyObject *__pyx_self, PyObject *__pyx_v_flags); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7_flags_to_int = {"_flags_to_int", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int(PyObject *__pyx_self, PyObject *__pyx_v_flags) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_flags_to_int (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6_flags_to_int(__pyx_self, ((PyObject *)__pyx_v_flags));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_6_flags_to_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_int(__pyx_v_flags, 0); if (unlikely(__pyx_t_1 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 211, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext._flags_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__23 = PyTuple_Pack(1, __pyx_n_s_flags_2); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__23);
      __Pyx_GIVEREF(__pyx_tuple__23);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7_flags_to_int, 0, __pyx_n_s_flags_to_int, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_flags_to_int, __pyx_t_3) < 0) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_flags_to_int, 211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 211, __pyx_L1_error)

     0212:     # Note, that order does not matter, libev has its own predefined order

    +0213:     if not flags:

      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flags); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 213, __pyx_L1_error)
      __pyx_t_2 = (!__pyx_t_1);
      if (__pyx_t_2) {

      }

    +0214:         return 0

        __pyx_r = 0;
        goto __pyx_L0;

    +0215:     if isinstance(flags, integer_types):

      __pyx_t_3 = __pyx_v_6gevent_5libev_8corecext_integer_types;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_2 = PyObject_IsInstance(__pyx_v_flags, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 215, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_2) {

      }

    +0216:         return flags

        __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_flags); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L1_error)
        __pyx_r = __pyx_t_4;
        goto __pyx_L0;

    +0217:     cdef unsigned int result = 0

      __pyx_v_result = 0;

    +0218:     try:

      {
        /*try:*/ {

        }
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L10_try_end;
        __pyx_L5_error:;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

        __pyx_L7_except_error:;
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
        goto __pyx_L1_error;
        __pyx_L10_try_end:;
      }

    +0219:         if isinstance(flags, basestring):

          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_basestring); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyObject_IsInstance(__pyx_v_flags, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 219, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_2) {

          }

    +0220:             flags = flags.split(',')

            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_flags, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 220, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_9 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_8))) {
              __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
              if (likely(__pyx_t_9)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                __Pyx_INCREF(__pyx_t_9);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_8, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_kp_s_};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            }
            __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_3);
            __pyx_t_3 = 0;

    +0221:         for value in flags:

          if (likely(PyList_CheckExact(__pyx_v_flags)) || PyTuple_CheckExact(__pyx_v_flags)) {
            __pyx_t_3 = __pyx_v_flags; __Pyx_INCREF(__pyx_t_3);
            __pyx_t_10 = 0;
            __pyx_t_11 = NULL;
          } else {
            __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 221, __pyx_L5_error)
          }
          for (;;) {
            if (likely(!__pyx_t_11)) {
              if (likely(PyList_CheckExact(__pyx_t_3))) {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                  #if !CYTHON_ASSUME_SAFE_MACROS
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 221, __pyx_L5_error)
                  #endif
                  if (__pyx_t_10 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 221, __pyx_L5_error)
                #else
                __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 221, __pyx_L5_error)
                __Pyx_GOTREF(__pyx_t_8);
                #endif
              } else {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                  #if !CYTHON_ASSUME_SAFE_MACROS
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 221, __pyx_L5_error)
                  #endif
                  if (__pyx_t_10 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 221, __pyx_L5_error)
                #else
                __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 221, __pyx_L5_error)
                __Pyx_GOTREF(__pyx_t_8);
                #endif
              }
            } else {
              __pyx_t_8 = __pyx_t_11(__pyx_t_3);
              if (unlikely(!__pyx_t_8)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else __PYX_ERR(0, 221, __pyx_L5_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_8);
            }
            __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8);
            __pyx_t_8 = 0;

          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0222:             value = value.strip().lower()

            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_strip); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 222, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_13 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_12))) {
              __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
              if (likely(__pyx_t_13)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                __Pyx_INCREF(__pyx_t_13);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_12, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
              __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 222, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            }
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_lower); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 222, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_9 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_12))) {
              __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_12);
              if (likely(__pyx_t_9)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                __Pyx_INCREF(__pyx_t_9);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_12, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
              __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 222, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            }
            __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
            __pyx_t_8 = 0;

    +0223:             if value:

            __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 223, __pyx_L5_error)
            if (__pyx_t_2) {

            }

    +0224:                 result |= _flags_str2int[value]

              __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_flags_str2int); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 224, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_12, __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 224, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = PyNumber_InPlaceOr(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 224, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_12); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L5_error)
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_v_result = __pyx_t_4;

    +0225:     except KeyError as ex:

        __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
        if (__pyx_t_14) {
          __Pyx_AddTraceback("gevent.libev.corecext._flags_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_12, &__pyx_t_9) < 0) __PYX_ERR(0, 225, __pyx_L7_except_error)
          __Pyx_XGOTREF(__pyx_t_3);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_12);
          __pyx_v_ex = __pyx_t_12;
          /*try:*/ {

          /*finally:*/ {
            __pyx_L21_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
              if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
              __Pyx_XGOTREF(__pyx_t_20);
              __Pyx_XGOTREF(__pyx_t_21);
              __Pyx_XGOTREF(__pyx_t_22);
              __Pyx_XGOTREF(__pyx_t_23);
              __Pyx_XGOTREF(__pyx_t_24);
              __Pyx_XGOTREF(__pyx_t_25);
              __pyx_t_14 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
              }
              if (PY_MAJOR_VERSION >= 3) {
                __Pyx_XGIVEREF(__pyx_t_23);
                __Pyx_XGIVEREF(__pyx_t_24);
                __Pyx_XGIVEREF(__pyx_t_25);
                __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
              }
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_XGIVEREF(__pyx_t_21);
              __Pyx_XGIVEREF(__pyx_t_22);
              __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
              __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
              __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
              goto __pyx_L7_except_error;
            }
          }
        }
        goto __pyx_L7_except_error;

    +0226:         raise ValueError('Invalid backend or flag: %s\nPossible values: %s' % (ex, ', '.join(sorted(_flags_str2int.keys()))))

            __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_flags_str2int); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 226, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_15);
            __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_keys); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 226, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __pyx_t_15 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_16))) {
              __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
              if (likely(__pyx_t_15)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
                __Pyx_INCREF(__pyx_t_15);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_16, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL};
              __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 226, __pyx_L21_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            }
            __pyx_t_16 = PySequence_List(__pyx_t_13); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 226, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __pyx_t_8 = ((PyObject*)__pyx_t_16);
            __pyx_t_16 = 0;
            __pyx_t_17 = PyList_Sort(__pyx_t_8); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 226, __pyx_L21_error)
            __pyx_t_16 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 226, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_INCREF(__pyx_v_ex);
            __Pyx_GIVEREF(__pyx_v_ex);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ex)) __PYX_ERR(0, 226, __pyx_L21_error);
            __Pyx_GIVEREF(__pyx_t_16);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_16)) __PYX_ERR(0, 226, __pyx_L21_error);
            __pyx_t_16 = 0;
            __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_backend_or_flag_s_Possib, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 226, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_Raise(__pyx_t_8, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __PYX_ERR(0, 226, __pyx_L21_error)
          }

    +0227:     return result

      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

     0228:

     0229:

    +0230: cdef str _str_hex(object flag):

    static PyObject *__pyx_f_6gevent_5libev_8corecext__str_hex(PyObject *__pyx_v_flag) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext._str_hex", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0231:     if isinstance(flag, integer_types):

      __pyx_t_1 = __pyx_v_6gevent_5libev_8corecext_integer_types;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = PyObject_IsInstance(__pyx_v_flag, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 231, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_2) {

      }

    +0232:         return hex(flag)

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_v_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 232, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L0;

    +0233:     return str(flag)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_Str(__pyx_v_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyString_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 233, __pyx_L1_error)
      __pyx_r = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0234:

     0235:

    +0236: cpdef _check_flags(unsigned int flags):

    static PyObject *__pyx_pw_6gevent_5libev_8corecext_9_check_flags(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
    static PyObject *__pyx_f_6gevent_5libev_8corecext__check_flags(unsigned int __pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyObject *__pyx_v_as_list = 0;
      PyObject *__pyx_8genexpr1__pyx_v_x = NULL;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent.libev.corecext._check_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_as_list);
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_9_check_flags(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_9_check_flags = {"_check_flags", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_9_check_flags, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_9_check_flags(PyObject *__pyx_self, PyObject *__pyx_arg_flags) {
      unsigned int __pyx_v_flags;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_check_flags (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      assert(__pyx_arg_flags); {
        __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 236, __pyx_L3_error)
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      __Pyx_AddTraceback("gevent.libev.corecext._check_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8_check_flags(__pyx_self, ((unsigned int)__pyx_v_flags));
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_8_check_flags(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_flags(__pyx_v_flags, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext._check_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_9_check_flags, 0, __pyx_n_s_check_flags, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_flags, __pyx_t_3) < 0) __PYX_ERR(0, 236, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_check_flags, 236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 236, __pyx_L1_error)

     0237:     cdef list as_list

    +0238:     flags &= libev.EVBACKEND_MASK

      __pyx_v_flags = (__pyx_v_flags & EVBACKEND_MASK);

    +0239:     if not flags:

      __pyx_t_1 = (!(__pyx_v_flags != 0));
      if (__pyx_t_1) {

      }

    +0240:         return

        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

    +0241:     if not (flags & libev.EVBACKEND_ALL):

      __pyx_t_1 = (!((__pyx_v_flags & EVBACKEND_ALL) != 0));
      if (unlikely(__pyx_t_1)) {

      }

    +0242:         raise ValueError('Invalid value for backend: 0x%x' % flags)

        __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_value_for_backend_0x_x, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 242, __pyx_L1_error)

    +0243:     if not (flags & libev.ev_supported_backends()):

      __pyx_t_1 = (!((__pyx_v_flags & ev_supported_backends()) != 0));
      if (unlikely(__pyx_t_1)) {

      }

    +0244:         as_list = [_str_hex(x) for x in _flags_to_list(flags)]

        { /* enter inner scope */
          __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(__pyx_v_flags, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
            __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4);
            __pyx_t_5 = 0;
            __pyx_t_6 = NULL;
          } else {
            __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L8_error)
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          for (;;) {
            if (likely(!__pyx_t_6)) {
              if (likely(PyList_CheckExact(__pyx_t_4))) {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
                  #if !CYTHON_ASSUME_SAFE_MACROS
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L8_error)
                  #endif
                  if (__pyx_t_5 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 244, __pyx_L8_error)
                #else
                __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L8_error)
                __Pyx_GOTREF(__pyx_t_3);
                #endif
              } else {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
                  #if !CYTHON_ASSUME_SAFE_MACROS
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L8_error)
                  #endif
                  if (__pyx_t_5 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 244, __pyx_L8_error)
                #else
                __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L8_error)
                __Pyx_GOTREF(__pyx_t_3);
                #endif
              }
            } else {
              __pyx_t_3 = __pyx_t_6(__pyx_t_4);
              if (unlikely(!__pyx_t_3)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else __PYX_ERR(0, 244, __pyx_L8_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_3);
            }
            __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_x, __pyx_t_3);
            __pyx_t_3 = 0;
            __pyx_t_3 = __pyx_f_6gevent_5libev_8corecext__str_hex(__pyx_8genexpr1__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 244, __pyx_L8_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
          goto __pyx_L12_exit_scope;
          __pyx_L8_error:;
          __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
          goto __pyx_L1_error;
          __pyx_L12_exit_scope:;
        } /* exit inner scope */
        __pyx_v_as_list = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

    +0245:         raise ValueError('Unsupported backend: %s' % '|'.join(as_list))

        __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_v_as_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Unsupported_backend_s, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 245, __pyx_L1_error)

     0246:

     0247:

    +0248: cpdef _events_to_str(int events):

    static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_events_to_str(PyObject *__pyx_self, PyObject *__pyx_arg_events); /*proto*/
    static PyObject *__pyx_f_6gevent_5libev_8corecext__events_to_str(int __pyx_v_events, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyObject *__pyx_v_result = 0;
      int __pyx_v_c_flag;
      PyObject *__pyx_v_flag = NULL;
      PyObject *__pyx_v_string = NULL;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("gevent.libev.corecext._events_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_flag);
      __Pyx_XDECREF(__pyx_v_string);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_events_to_str(PyObject *__pyx_self, PyObject *__pyx_arg_events); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_11_events_to_str = {"_events_to_str", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_11_events_to_str, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_events_to_str(PyObject *__pyx_self, PyObject *__pyx_arg_events) {
      int __pyx_v_events;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_events_to_str (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      assert(__pyx_arg_events); {
        __pyx_v_events = __Pyx_PyInt_As_int(__pyx_arg_events); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L3_error)
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      __Pyx_AddTraceback("gevent.libev.corecext._events_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_10_events_to_str(__pyx_self, ((int)__pyx_v_events));
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_10_events_to_str(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_events) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__events_to_str(__pyx_v_events, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext._events_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__26 = PyTuple_Pack(2, __pyx_n_s_events_2, __pyx_n_s_events_2); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__26);
      __Pyx_GIVEREF(__pyx_tuple__26);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_11_events_to_str, 0, __pyx_n_s_events_to_str, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_events_to_str, __pyx_t_3) < 0) __PYX_ERR(0, 248, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_events_to_str, 248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 248, __pyx_L1_error)

    +0249:     cdef list result = []

      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_result = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

     0250:     cdef int c_flag

    +0251:     for (flag, string) in _events:

      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_events); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = 0;
        __pyx_t_4 = NULL;
      } else {
        __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_4)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 251, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 251, __pyx_L1_error)
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 251, __pyx_L1_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 251, __pyx_L1_error)
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          }
        } else {
          __pyx_t_1 = __pyx_t_4(__pyx_t_2);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 251, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 251, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
          } else {
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
            __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
          }
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 251, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 251, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
          index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 251, __pyx_L1_error)
          __pyx_t_8 = NULL;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L6_unpacking_done;
          __pyx_L5_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_8 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 251, __pyx_L1_error)
          __pyx_L6_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_string, __pyx_t_6);
        __pyx_t_6 = 0;

      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L9_for_end;
      __pyx_L4_break:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L9_for_end;
      __pyx_L9_for_end:;

    +0252:         c_flag = flag

        __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_flag); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 252, __pyx_L1_error)
        __pyx_v_c_flag = __pyx_t_9;

    +0253:         if events & c_flag:

        __pyx_t_10 = ((__pyx_v_events & __pyx_v_c_flag) != 0);
        if (__pyx_t_10) {

        }

    +0254:             result.append(string)

          __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_string); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 254, __pyx_L1_error)

    +0255:             events = events & (~c_flag)

          __pyx_v_events = (__pyx_v_events & (~__pyx_v_c_flag));

    +0256:         if not events:

        __pyx_t_10 = (!(__pyx_v_events != 0));
        if (__pyx_t_10) {

        }

    +0257:             break

          goto __pyx_L4_break;

    +0258:     if events:

      __pyx_t_10 = (__pyx_v_events != 0);
      if (__pyx_t_10) {

      }

    +0259:         result.append(hex(events))

        __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 259, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0260:     return '|'.join(result)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0261:

     0262:

    +0263: def supported_backends():

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_13supported_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_13supported_backends = {"supported_backends", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_13supported_backends, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_13supported_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("supported_backends (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12supported_backends(__pyx_self);

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_12supported_backends(CYTHON_UNUSED PyObject *__pyx_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.supported_backends", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_13supported_backends, 0, __pyx_n_s_supported_backends, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_supported_backends, __pyx_t_3) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(0, 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_src_gevent_libev_corecext_pyx, __pyx_n_s_supported_backends, 263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 263, __pyx_L1_error)

    +0264:     return _flags_to_list(libev.ev_supported_backends())

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(ev_supported_backends(), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0265:

     0266:

    +0267: def recommended_backends():

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_15recommended_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_15recommended_backends = {"recommended_backends", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_15recommended_backends, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_15recommended_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("recommended_backends (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_14recommended_backends(__pyx_self);

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_14recommended_backends(CYTHON_UNUSED PyObject *__pyx_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.recommended_backends", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_15recommended_backends, 0, __pyx_n_s_recommended_backends, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_recommended_backends, __pyx_t_3) < 0) __PYX_ERR(0, 267, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(0, 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_src_gevent_libev_corecext_pyx, __pyx_n_s_recommended_backends, 267, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 267, __pyx_L1_error)

    +0268:     return _flags_to_list(libev.ev_recommended_backends())

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(ev_recommended_backends(), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0269:

     0270:

    +0271: def embeddable_backends():

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_17embeddable_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_17embeddable_backends = {"embeddable_backends", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_17embeddable_backends, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_17embeddable_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("embeddable_backends (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_16embeddable_backends(__pyx_self);

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_16embeddable_backends(CYTHON_UNUSED PyObject *__pyx_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.embeddable_backends", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_17embeddable_backends, 0, __pyx_n_s_embeddable_backends, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_embeddable_backends, __pyx_t_3) < 0) __PYX_ERR(0, 271, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(0, 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_src_gevent_libev_corecext_pyx, __pyx_n_s_embeddable_backends, 271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 271, __pyx_L1_error)

    +0272:     return _flags_to_list(libev.ev_embeddable_backends())

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(ev_embeddable_backends(), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0273:

     0274:

    +0275: def time():

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_19time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_19time = {"time", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_19time, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_19time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("time (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_18time(__pyx_self);

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_18time(CYTHON_UNUSED PyObject *__pyx_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_19time, 0, __pyx_n_s_time, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_3) < 0) __PYX_ERR(0, 275, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(0, 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_src_gevent_libev_corecext_pyx, __pyx_n_s_time, 275, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 275, __pyx_L1_error)

    +0276:     return libev.ev_time()

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyFloat_FromDouble(ev_time()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0277:

    +0278: cdef bint _check_loop(loop loop) except -1:

    static int __pyx_f_6gevent_5libev_8corecext__check_loop(struct PyGeventLoopObject *__pyx_v_loop) {
      int __pyx_r;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext._check_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0279:     if not loop._ptr:

      __pyx_t_1 = (!(__pyx_v_loop->_ptr != 0));
      if (unlikely(__pyx_t_1)) {

      }

    +0280:         raise ValueError('operation on destroyed loop')

        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 280, __pyx_L1_error)

      __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 280, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__4);
      __Pyx_GIVEREF(__pyx_tuple__4);

    +0281:     return 1

      __pyx_r = 1;
      goto __pyx_L0;

     0282:

     0283:

     0284:

    +0285: cdef public class callback [object PyGeventCallbackObject, type PyGeventCallback_Type]:

    struct PyGeventCallbackObject {
      PyObject_HEAD
      PyObject *callback;
      PyObject *args;
      struct PyGeventCallbackObject *next;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventCallback_Type;

    +0286:     cdef public object callback

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_8callback_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8callback___get__(((struct PyGeventCallbackObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_8callback___get__(struct PyGeventCallbackObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->callback);
      __pyx_r = __pyx_v_self->callback;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_2__set__(((struct PyGeventCallbackObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_2__set__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_value) {
      int __pyx_r;
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __Pyx_GOTREF(__pyx_v_self->callback);
      __Pyx_DECREF(__pyx_v_self->callback);
      __pyx_v_self->callback = __pyx_v_value;

      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_5__del__(PyObject *__pyx_v_self); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_5__del__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_4__del__(((struct PyGeventCallbackObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_4__del__(struct PyGeventCallbackObject *__pyx_v_self) {
      int __pyx_r;
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->callback);
      __Pyx_DECREF(__pyx_v_self->callback);
      __pyx_v_self->callback = Py_None;

      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0287:     cdef public tuple args

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_4args_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4args___get__(((struct PyGeventCallbackObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_4args___get__(struct PyGeventCallbackObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->args);
      __pyx_r = __pyx_v_self->args;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4args_2__set__(((struct PyGeventCallbackObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_8callback_4args_2__set__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_value) {
      int __pyx_r;
      if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(0, 287, __pyx_L1_error)
      __pyx_t_1 = __pyx_v_value;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->args);
      __Pyx_DECREF(__pyx_v_self->args);
      __pyx_v_self->args = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.callback.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_5__del__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4args_4__del__(((struct PyGeventCallbackObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_8callback_4args_4__del__(struct PyGeventCallbackObject *__pyx_v_self) {
      int __pyx_r;
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->args);
      __Pyx_DECREF(__pyx_v_self->args);
      __pyx_v_self->args = ((PyObject*)Py_None);

      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0288:     cdef callback next

     0289:

    +0290:     def __init__(self, callback, args):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_callback = 0;
      PyObject *__pyx_v_args = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_args,0};
      PyObject* values[2] = {0,0};
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 290, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_args)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 290, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 290, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 290, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
          values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        }
        __pyx_v_callback = values[0];
        __pyx_v_args = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 290, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.callback.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback___init__(((struct PyGeventCallbackObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_8callback___init__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.callback.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0291:         self.callback = callback

      __Pyx_INCREF(__pyx_v_callback);
      __Pyx_GIVEREF(__pyx_v_callback);
      __Pyx_GOTREF(__pyx_v_self->callback);
      __Pyx_DECREF(__pyx_v_self->callback);
      __pyx_v_self->callback = __pyx_v_callback;

    +0292:         self.args = args

      if (!(likely(PyTuple_CheckExact(__pyx_v_args))||((__pyx_v_args) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_args))) __PYX_ERR(0, 292, __pyx_L1_error)
      __pyx_t_1 = __pyx_v_args;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->args);
      __Pyx_DECREF(__pyx_v_self->args);
      __pyx_v_self->args = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

     0293:

    +0294:     def stop(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_8callback_3stop = {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_8callback_3stop, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("stop (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_2stop(((struct PyGeventCallbackObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_2stop(struct PyGeventCallbackObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__32);
      __Pyx_GIVEREF(__pyx_tuple__32);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_8callback_3stop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_callback_stop, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_callback, __pyx_n_s_stop, __pyx_t_3) < 0) __PYX_ERR(0, 294, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_callback);
      __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_stop, 294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 294, __pyx_L1_error)

    +0295:         self.callback = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->callback);
      __Pyx_DECREF(__pyx_v_self->callback);
      __pyx_v_self->callback = Py_None;

    +0296:         self.args = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->args);
      __Pyx_DECREF(__pyx_v_self->args);
      __pyx_v_self->args = ((PyObject*)Py_None);

     0297:

    +0298:     close = stop

      __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6gevent_5libev_8corecext_callback, __pyx_n_s_stop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_callback, __pyx_n_s_close, __pyx_t_3) < 0) __PYX_ERR(0, 298, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_callback);

     0299:

     0300:     # Note, that __nonzero__ and pending are different

     0301:     # nonzero is used in contexts where we need to know whether to schedule another callback,

     0302:     # so it's true if it's pending or currently running

     0303:     # 'pending' has the same meaning as libev watchers: it is cleared before entering callback

     0304:

    +0305:     def __nonzero__(self):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_5__nonzero__(PyObject *__pyx_v_self); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_8callback_5__nonzero__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4__nonzero__(((struct PyGeventCallbackObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_8callback_4__nonzero__(struct PyGeventCallbackObject *__pyx_v_self) {
      int __pyx_r;

      /* function exit code */
      __pyx_L0:;
      return __pyx_r;
    }

     0306:         # it's nonzero if it's pending or currently executing

    +0307:         return self.args is not None

      __pyx_t_1 = (__pyx_v_self->args != ((PyObject*)Py_None));
      __pyx_r = __pyx_t_1;
      goto __pyx_L0;

     0308:

    +0309:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7pending_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_7pending___get__(((struct PyGeventCallbackObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_7pending___get__(struct PyGeventCallbackObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.callback.pending.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0310:     def pending(self):

    +0311:         return self.callback is not None

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = (__pyx_v_self->callback != Py_None);
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0312:

    +0313:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_6__repr__(((struct PyGeventCallbackObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_6__repr__(struct PyGeventCallbackObject *__pyx_v_self) {
      PyObject *__pyx_v_format = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent.libev.corecext.callback.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_format);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0314:         if Py_ReprEnter(self) != 0:

      __pyx_t_1 = (Py_ReprEnter(((PyObject *)__pyx_v_self)) != 0);
      if (__pyx_t_1) {

      }

    +0315:             return "<...>"

        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_kp_s__5);
        __pyx_r = __pyx_kp_s__5;
        goto __pyx_L0;

    +0316:         try:

      /*try:*/ {

    +0317:             format = self._format()

        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_v_format = __pyx_t_2;
        __pyx_t_2 = 0;

    +0318:             result = "<%s at 0x%x%s" % (self.__class__.__name__, id(self), format)

        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 318, __pyx_L5_error);
        __Pyx_GIVEREF(__pyx_t_2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 318, __pyx_L5_error);
        __Pyx_INCREF(__pyx_v_format);
        __Pyx_GIVEREF(__pyx_v_format);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_format)) __PYX_ERR(0, 318, __pyx_L5_error);
        __pyx_t_3 = 0;
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_at_0x_x_s, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_result = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

    +0319:             if self.pending:

        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pending); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 319, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_1) {

        }

    +0320:                 result += " pending"

          __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s_pending_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

    +0321:             if self.callback is not None:

        __pyx_t_1 = (__pyx_v_self->callback != Py_None);
        if (__pyx_t_1) {

        }

    +0322:                 result += " callback=%r" % (self.callback, )

          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_self->callback);
          __Pyx_GIVEREF(__pyx_v_self->callback);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->callback)) __PYX_ERR(0, 322, __pyx_L5_error);
          __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_callback_r, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

    +0323:             if self.args is not None:

        __pyx_t_1 = (__pyx_v_self->args != ((PyObject*)Py_None));
        if (__pyx_t_1) {

        }

    +0324:                 result += " args=%r" % (self.args, )

          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_self->args);
          __Pyx_GIVEREF(__pyx_v_self->args);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->args)) __PYX_ERR(0, 324, __pyx_L5_error);
          __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_args_r, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

    +0325:             if self.callback is None and self.args is None:

        __pyx_t_6 = (__pyx_v_self->callback == Py_None);
        if (__pyx_t_6) {
        } else {
          __pyx_t_1 = __pyx_t_6;
          goto __pyx_L11_bool_binop_done;
        }
        __pyx_t_6 = (__pyx_v_self->args == ((PyObject*)Py_None));
        __pyx_t_1 = __pyx_t_6;
        __pyx_L11_bool_binop_done:;
        if (__pyx_t_1) {

        }

    +0326:                 result += " stopped"

          __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s_stopped); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

    +0327:             return result + ">"

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L4_return;
      }

     0328:         finally:

    +0329:             Py_ReprLeave(self)

      /*finally:*/ {
        __pyx_L5_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
          {
            Py_ReprLeave(((PyObject *)__pyx_v_self));
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          }
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
          __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
          goto __pyx_L1_error;
        }
        __pyx_L4_return: {
          __pyx_t_15 = __pyx_r;
          __pyx_r = 0;
          Py_ReprLeave(((PyObject *)__pyx_v_self));
          __pyx_r = __pyx_t_15;
          __pyx_t_15 = 0;
          goto __pyx_L0;
        }
      }

     0330:

    +0331:     def _format(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_8callback_9_format = {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_8callback_9_format, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_format (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8_format(((struct PyGeventCallbackObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_8_format(CYTHON_UNUSED struct PyGeventCallbackObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_8callback_9_format, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_callback__format, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_callback, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_callback);

      __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_format, 331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 331, __pyx_L1_error)

    +0332:         return ''

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_kp_s__7);
      __pyx_r = __pyx_kp_s__7;
      goto __pyx_L0;

     0333:

     0334: # See comments in cares.pyx about DEF constants and when to use

     0335: # what kind.

     0336: cdef extern from *:

     0337:     """

     0338:     #define CALLBACK_CHECK_COUNT 50

     0339:     """

     0340:     int CALLBACK_CHECK_COUNT

     0341:

     0342: @cython.final

     0343: @cython.internal

    +0344: cdef class CallbackFIFO(object):

    struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO {
      PyObject_HEAD
      struct __pyx_vtabstruct_6gevent_5libev_8corecext_CallbackFIFO *__pyx_vtab;
      struct PyGeventCallbackObject *head;
      struct PyGeventCallbackObject *tail;
    };

    struct __pyx_vtabstruct_6gevent_5libev_8corecext_CallbackFIFO {
      PyObject *(*clear)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);
      struct PyGeventCallbackObject *(*popleft)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);
      PyObject *(*append)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *, struct PyGeventCallbackObject *);
      int (*has_callbacks)(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);
    };
    static struct __pyx_vtabstruct_6gevent_5libev_8corecext_CallbackFIFO *__pyx_vtabptr_6gevent_5libev_8corecext_CallbackFIFO;
    static CYTHON_INLINE PyObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_clear(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);
    static CYTHON_INLINE struct PyGeventCallbackObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_popleft(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);
    static CYTHON_INLINE PyObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_append(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *, struct PyGeventCallbackObject *);
    static int __pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_has_callbacks(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *);

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventLoop_Type;

     0345:     cdef callback head

     0346:     cdef callback tail

     0347:

    +0348:     def __init__(self):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) {
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}
      if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO___init__(((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO___init__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0349:         self.head = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->head);
      __Pyx_DECREF((PyObject *)__pyx_v_self->head);
      __pyx_v_self->head = ((struct PyGeventCallbackObject *)Py_None);

    +0350:         self.tail = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->tail);
      __Pyx_DECREF((PyObject *)__pyx_v_self->tail);
      __pyx_v_self->tail = ((struct PyGeventCallbackObject *)Py_None);

     0351:

    +0352:     cdef inline clear(self):

    static CYTHON_INLINE PyObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_clear(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0353:         self.head = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->head);
      __Pyx_DECREF((PyObject *)__pyx_v_self->head);
      __pyx_v_self->head = ((struct PyGeventCallbackObject *)Py_None);

    +0354:         self.tail = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->tail);
      __Pyx_DECREF((PyObject *)__pyx_v_self->tail);
      __pyx_v_self->tail = ((struct PyGeventCallbackObject *)Py_None);

     0355:

    +0356:     cdef inline callback popleft(self):

    static CYTHON_INLINE struct PyGeventCallbackObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_popleft(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
      struct PyGeventCallbackObject *__pyx_v_head = 0;
      struct PyGeventCallbackObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_head);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0357:         cdef callback head = self.head

      __pyx_t_1 = ((PyObject *)__pyx_v_self->head);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_head = ((struct PyGeventCallbackObject *)__pyx_t_1);
      __pyx_t_1 = 0;

    +0358:         self.head = head.next

      __pyx_t_1 = ((PyObject *)__pyx_v_head->next);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->head);
      __Pyx_DECREF((PyObject *)__pyx_v_self->head);
      __pyx_v_self->head = ((struct PyGeventCallbackObject *)__pyx_t_1);
      __pyx_t_1 = 0;

    +0359:         if self.head is self.tail or self.head is None:

      __pyx_t_3 = (__pyx_v_self->head == __pyx_v_self->tail);
      if (!__pyx_t_3) {
      } else {
        __pyx_t_2 = __pyx_t_3;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_3 = (((PyObject *)__pyx_v_self->head) == Py_None);
      __pyx_t_2 = __pyx_t_3;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_2) {

      }

    +0360:             self.tail = None

        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        __Pyx_GOTREF((PyObject *)__pyx_v_self->tail);
        __Pyx_DECREF((PyObject *)__pyx_v_self->tail);
        __pyx_v_self->tail = ((struct PyGeventCallbackObject *)Py_None);

    +0361:         head.next = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF((PyObject *)__pyx_v_head->next);
      __Pyx_DECREF((PyObject *)__pyx_v_head->next);
      __pyx_v_head->next = ((struct PyGeventCallbackObject *)Py_None);

    +0362:         return head

      __Pyx_XDECREF((PyObject *)__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_head);
      __pyx_r = __pyx_v_head;
      goto __pyx_L0;

     0363:

    +0364:     cdef inline append(self, callback new_tail):

    static CYTHON_INLINE PyObject *__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_append(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self, struct PyGeventCallbackObject *__pyx_v_new_tail) {
      struct PyGeventCallbackObject *__pyx_v_old_tail = NULL;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.CallbackFIFO.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_old_tail);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0365:         assert not new_tail.next

      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_new_tail->next)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 365, __pyx_L1_error)
        __pyx_t_2 = (!__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
          __PYX_ERR(0, 365, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 365, __pyx_L1_error)
      #endif

    +0366:         if self.tail is None:

      __pyx_t_2 = (((PyObject *)__pyx_v_self->tail) == Py_None);
      if (__pyx_t_2) {

      }

    +0367:             if self.head is None:

        __pyx_t_2 = (((PyObject *)__pyx_v_self->head) == Py_None);
        if (__pyx_t_2) {

        }

     0368:                 # Completely empty, so this

     0369:                 # is now our head

    +0370:                 self.head = new_tail

          __Pyx_INCREF((PyObject *)__pyx_v_new_tail);
          __Pyx_GIVEREF((PyObject *)__pyx_v_new_tail);
          __Pyx_GOTREF((PyObject *)__pyx_v_self->head);
          __Pyx_DECREF((PyObject *)__pyx_v_self->head);
          __pyx_v_self->head = __pyx_v_new_tail;

    +0371:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

    +0372:             self.tail = self.head

        __pyx_t_3 = ((PyObject *)__pyx_v_self->head);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        __Pyx_GOTREF((PyObject *)__pyx_v_self->tail);
        __Pyx_DECREF((PyObject *)__pyx_v_self->tail);
        __pyx_v_self->tail = ((struct PyGeventCallbackObject *)__pyx_t_3);
        __pyx_t_3 = 0;

     0373:

    +0374:         assert self.head is not None

      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_2 = (((PyObject *)__pyx_v_self->head) != Py_None);
        if (unlikely(!__pyx_t_2)) {
          __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
          __PYX_ERR(0, 374, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 374, __pyx_L1_error)
      #endif

    +0375:         old_tail = self.tail

      __pyx_t_3 = ((PyObject *)__pyx_v_self->tail);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_old_tail = ((struct PyGeventCallbackObject *)__pyx_t_3);
      __pyx_t_3 = 0;

    +0376:         old_tail.next = new_tail

      __Pyx_INCREF((PyObject *)__pyx_v_new_tail);
      __Pyx_GIVEREF((PyObject *)__pyx_v_new_tail);
      __Pyx_GOTREF((PyObject *)__pyx_v_old_tail->next);
      __Pyx_DECREF((PyObject *)__pyx_v_old_tail->next);
      __pyx_v_old_tail->next = __pyx_v_new_tail;

    +0377:         self.tail = new_tail

      __Pyx_INCREF((PyObject *)__pyx_v_new_tail);
      __Pyx_GIVEREF((PyObject *)__pyx_v_new_tail);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->tail);
      __Pyx_DECREF((PyObject *)__pyx_v_self->tail);
      __pyx_v_self->tail = __pyx_v_new_tail;

     0378:

    +0379:     def __nonzero__(self):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_3__nonzero__(PyObject *__pyx_v_self); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_3__nonzero__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_2__nonzero__(((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_2__nonzero__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
      int __pyx_r;

      /* function exit code */
      __pyx_L0:;
      return __pyx_r;
    }

    +0380:         return self.head is not None

      __pyx_t_1 = (((PyObject *)__pyx_v_self->head) != Py_None);
      __pyx_r = __pyx_t_1;
      goto __pyx_L0;

     0381:

    +0382:     def __len__(self):

    /* Python wrapper */
    static Py_ssize_t __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_5__len__(PyObject *__pyx_v_self); /*proto*/
    static Py_ssize_t __pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_5__len__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      Py_ssize_t __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_4__len__(((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static Py_ssize_t __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_4__len__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
      Py_ssize_t __pyx_v_count;
      struct PyGeventCallbackObject *__pyx_v_head = NULL;
      Py_ssize_t __pyx_r;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_head);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0383:         cdef Py_ssize_t count = 0

      __pyx_v_count = 0;

    +0384:         head = self.head

      __pyx_t_1 = ((PyObject *)__pyx_v_self->head);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_head = ((struct PyGeventCallbackObject *)__pyx_t_1);
      __pyx_t_1 = 0;

    +0385:         while head is not None:

      while (1) {
        __pyx_t_2 = (((PyObject *)__pyx_v_head) != Py_None);
        if (!__pyx_t_2) break;

    +0386:             count += 1

        __pyx_v_count = (__pyx_v_count + 1);

    +0387:             head = head.next

        __pyx_t_1 = ((PyObject *)__pyx_v_head->next);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_head, ((struct PyGeventCallbackObject *)__pyx_t_1));
        __pyx_t_1 = 0;
      }

    +0388:         return count

      __pyx_r = __pyx_v_count;
      goto __pyx_L0;

     0389:

    +0390:     def __iter__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_7__iter__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_7__iter__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_6__iter__(((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_6__iter__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
      PyObject *__pyx_v_objects = 0;
      struct PyGeventCallbackObject *__pyx_v_head = NULL;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.CallbackFIFO.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_objects);
      __Pyx_XDECREF((PyObject *)__pyx_v_head);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0391:         cdef list objects = []

      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_objects = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

    +0392:         head = self.head

      __pyx_t_1 = ((PyObject *)__pyx_v_self->head);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_head = ((struct PyGeventCallbackObject *)__pyx_t_1);
      __pyx_t_1 = 0;

    +0393:         while head is not None:

      while (1) {
        __pyx_t_2 = (((PyObject *)__pyx_v_head) != Py_None);
        if (!__pyx_t_2) break;

    +0394:             objects.append(head)

        __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_objects, ((PyObject *)__pyx_v_head)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 394, __pyx_L1_error)

    +0395:             head = head.next

        __pyx_t_1 = ((PyObject *)__pyx_v_head->next);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_head, ((struct PyGeventCallbackObject *)__pyx_t_1));
        __pyx_t_1 = 0;
      }

    +0396:         return iter(objects)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyObject_GetIter(__pyx_v_objects); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0397:

    +0398:     cdef bint has_callbacks(self):

    static int __pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_has_callbacks(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
      int __pyx_r;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.CallbackFIFO.has_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      return __pyx_r;
    }

    +0399:         return self.head

      __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->head)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 399, __pyx_L1_error)
      __pyx_r = __pyx_t_1;
      goto __pyx_L0;

     0400:

    +0401:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_9__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_12CallbackFIFO_9__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_8__repr__(((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_12CallbackFIFO_8__repr__(struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent.libev.corecext.CallbackFIFO.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0402:         return "<callbacks@%r len=%d head=%r tail=%r>" % (id(self), len(self), self.head, self.tail)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 402, __pyx_L1_error)
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error);
      __Pyx_INCREF((PyObject *)__pyx_v_self->head);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self->head);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_self->head))) __PYX_ERR(0, 402, __pyx_L1_error);
      __Pyx_INCREF((PyObject *)__pyx_v_self->tail);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self->tail);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_v_self->tail))) __PYX_ERR(0, 402, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_callbacks_r_len_d_head_r_tail_r, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

     0403:

     0404:

    +0405: cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:

    struct PyGeventLoopObject {
      PyObject_HEAD
      struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *__pyx_vtab;
      struct ev_prepare _prepare;
      struct ev_timer _timer0;
      struct ev_async _threadsafe_async;
      struct ev_timer _periodic_signal_checker;
      PyObject *error_handler;
      struct ev_loop *_ptr;
      struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *_callbacks;
      int starting_timer_may_update_loop_time;
      int _default;
      double approx_timer_resolution;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventLoop_Type;

    struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop {
      PyObject *(*_run_callbacks)(struct PyGeventLoopObject *);
      PyObject *(*_stop_watchers)(struct PyGeventLoopObject *, struct ev_loop *);
      PyObject *(*handle_error)(struct PyGeventLoopObject *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
      PyObject *(*_default_handle_error)(struct PyGeventLoopObject *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
      ev_tstamp (*now)(struct PyGeventLoopObject *, int __pyx_skip_dispatch);
      void (*update_now)(struct PyGeventLoopObject *, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *__pyx_vtabptr_6gevent_5libev_8corecext_loop;

     0406:     ## embedded struct members

     0407:     cdef libev.ev_prepare _prepare

     0408:     cdef libev.ev_timer _timer0

     0409:     cdef libev.ev_async _threadsafe_async

     0410:     # We'll only actually start this timer if we're on Windows,

     0411:     # but it doesn't hurt to compile it in on all platforms.

     0412:     cdef libev.ev_timer _periodic_signal_checker

     0413:

     0414:     ## pointer members

    +0415:     cdef public object error_handler

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->error_handler);
      __pyx_r = __pyx_v_self->error_handler;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_2__set__(((struct PyGeventLoopObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_2__set__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_value) {
      int __pyx_r;
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __Pyx_GOTREF(__pyx_v_self->error_handler);
      __Pyx_DECREF(__pyx_v_self->error_handler);
      __pyx_v_self->error_handler = __pyx_v_value;

      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_5__del__(PyObject *__pyx_v_self); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_5__del__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_4__del__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_4__del__(struct PyGeventLoopObject *__pyx_v_self) {
      int __pyx_r;
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->error_handler);
      __Pyx_DECREF(__pyx_v_self->error_handler);
      __pyx_v_self->error_handler = Py_None;

      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0416:     cdef libev.ev_loop* _ptr

    +0417:     cdef public CallbackFIFO _callbacks

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_self->_callbacks);
      __pyx_r = ((PyObject *)__pyx_v_self->_callbacks);
      goto __pyx_L0;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_2__set__(((struct PyGeventLoopObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_2__set__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_value) {
      int __pyx_r;
      if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO))))) __PYX_ERR(0, 417, __pyx_L1_error)
      __pyx_t_1 = __pyx_v_value;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->_callbacks);
      __Pyx_DECREF((PyObject *)__pyx_v_self->_callbacks);
      __pyx_v_self->_callbacks = ((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.loop._callbacks.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_5__del__(PyObject *__pyx_v_self); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_5__del__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_4__del__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_4__del__(struct PyGeventLoopObject *__pyx_v_self) {
      int __pyx_r;
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->_callbacks);
      __Pyx_DECREF((PyObject *)__pyx_v_self->_callbacks);
      __pyx_v_self->_callbacks = ((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)Py_None);

      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0418:

     0419:     ## data members

     0420:     cdef bint starting_timer_may_update_loop_time

     0421:     # We must capture the 'default' state at initialiaztion

     0422:     # time. Destroying the default loop in libev sets

     0423:     # the libev internal pointer to 0, and ev_is_default_loop will

     0424:     # no longer work.

     0425:     cdef bint _default

    +0426:     cdef readonly double approx_timer_resolution

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_23approx_timer_resolution_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_23approx_timer_resolution_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_23approx_timer_resolution___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_23approx_timer_resolution___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->approx_timer_resolution); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.approx_timer_resolution.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0427:

    +0428:     def __cinit__(self, object flags=None, object default=None, libev.intptr_t ptr=0):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_flags = 0;
      PyObject *__pyx_v_default = 0;
      intptr_t __pyx_v_ptr;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flags_2,&__pyx_n_s_default,&__pyx_n_s_ptr,0};
      PyObject* values[3] = {0,0,0};
        values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flags_2);
              if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
              if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ptr);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 428, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_flags = values[0];
        __pyx_v_default = values[1];
        if (values[2]) {
          __pyx_v_ptr = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_ptr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L3_error)
        } else {
          __pyx_v_ptr = ((intptr_t)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 428, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop___cinit__(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_flags, __pyx_v_default, __pyx_v_ptr);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_4loop___cinit__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_flags, PyObject *__pyx_v_default, intptr_t __pyx_v_ptr) {
      unsigned int __pyx_v_c_flags;
      int __pyx_r;
      __Pyx_INCREF(__pyx_v_default);

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_default);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0429:         self.starting_timer_may_update_loop_time = 0

      __pyx_v_self->starting_timer_may_update_loop_time = 0;

    +0430:         self._default = 0

      __pyx_v_self->_default = 0;

    +0431:         libev.ev_prepare_init(&self._prepare,

      ev_prepare_init((&__pyx_v_self->_prepare), ((void *)gevent_run_callbacks));

     0432:                               <void*>gevent_run_callbacks)

    +0433:         libev.ev_timer_init(&self._periodic_signal_checker,

      ev_timer_init((&__pyx_v_self->_periodic_signal_checker), ((void *)gevent_periodic_signal_check), 0.3, 0.3);

     0434:                             <void*>gevent_periodic_signal_check,

     0435:                             0.3, 0.3)

    +0436:         libev.ev_timer_init(&self._timer0,

      ev_timer_init((&__pyx_v_self->_timer0), ((void *)gevent_noop), 0.0, 0.0);

     0437:                             <void*>gevent_noop,

     0438:                             0.0, 0.0)

    +0439:         libev.ev_async_init(&self._threadsafe_async,

      ev_async_init((&__pyx_v_self->_threadsafe_async), ((void *)gevent_noop));

     0440:                             <void*>gevent_noop)

     0441:

     0442:         cdef unsigned int c_flags

    +0443:         if ptr:

      __pyx_t_1 = (__pyx_v_ptr != 0);
      if (__pyx_t_1) {

        goto __pyx_L3;
      }

    +0444:             self._ptr = <libev.ev_loop*>ptr

        __pyx_v_self->_ptr = ((struct ev_loop *)__pyx_v_ptr);

    +0445:             self._default = libev.ev_is_default_loop(self._ptr)

        __pyx_v_self->_default = ev_is_default_loop(__pyx_v_self->_ptr);

     0446:         else:

    +0447:             c_flags = _flags_to_int(flags)

      /*else*/ {
        __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__flags_to_int(__pyx_v_flags, 0); if (unlikely(__pyx_t_2 == ((unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
        __pyx_v_c_flags = __pyx_t_2;

    +0448:             _check_flags(c_flags)

        __pyx_t_3 = __pyx_f_6gevent_5libev_8corecext__check_flags(__pyx_v_c_flags, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0449:             c_flags |= libev.EVFLAG_NOENV

        __pyx_v_c_flags = (__pyx_v_c_flags | EVFLAG_NOENV);

    +0450:             c_flags |= libev.EVFLAG_FORKCHECK

        __pyx_v_c_flags = (__pyx_v_c_flags | EVFLAG_FORKCHECK);

    +0451:             if default is None:

        __pyx_t_1 = (__pyx_v_default == Py_None);
        if (__pyx_t_1) {

        }

    +0452:                 default = True

          __Pyx_INCREF(Py_True);
          __Pyx_DECREF_SET(__pyx_v_default, Py_True);

    +0453:             if default:

        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_default); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 453, __pyx_L1_error)
        if (__pyx_t_1) {

          goto __pyx_L5;
        }

    +0454:                 self._default = 1

          __pyx_v_self->_default = 1;

    +0455:                 self._ptr = libev.gevent_ev_default_loop(c_flags)

          __pyx_v_self->_ptr = gevent_ev_default_loop(__pyx_v_c_flags);

    +0456:                 if not self._ptr:

          __pyx_t_1 = (!(__pyx_v_self->_ptr != 0));
          if (unlikely(__pyx_t_1)) {

          }

    +0457:                     raise SystemError("ev_default_loop(%s) failed" % (c_flags, ))

            __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_c_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error);
            __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_ev_default_loop_s_failed, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_SystemError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_Raise(__pyx_t_4, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __PYX_ERR(0, 457, __pyx_L1_error)

    +0458:                 if sys.platform == "win32":

          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 458, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_platform); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_win32, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 458, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_1) {

          }

    +0459:                     libev.ev_timer_start(self._ptr, &self._periodic_signal_checker)

            ev_timer_start(__pyx_v_self->_ptr, (&__pyx_v_self->_periodic_signal_checker));

    +0460:                     libev.ev_unref(self._ptr)

            ev_unref(__pyx_v_self->_ptr);

     0461:             else:

    +0462:                 self._ptr = libev.ev_loop_new(c_flags)

        /*else*/ {
          __pyx_v_self->_ptr = ev_loop_new(__pyx_v_c_flags);

    +0463:                 if not self._ptr:

          __pyx_t_1 = (!(__pyx_v_self->_ptr != 0));
          if (unlikely(__pyx_t_1)) {

          }
        }
        __pyx_L5:;

    +0464:                     raise SystemError("ev_loop_new(%s) failed" % (c_flags, ))

            __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_c_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error);
            __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_ev_loop_new_s_failed, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_SystemError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_Raise(__pyx_t_4, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __PYX_ERR(0, 464, __pyx_L1_error)

    +0465:             if default or SYSERR_CALLBACK is None:

        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_default); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 465, __pyx_L1_error)
        if (!__pyx_t_5) {
        } else {
          __pyx_t_1 = __pyx_t_5;
          goto __pyx_L10_bool_binop_done;
        }
        __pyx_t_5 = (__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK == Py_None);
        __pyx_t_1 = __pyx_t_5;
        __pyx_L10_bool_binop_done:;
        if (__pyx_t_1) {

        }
      }
      __pyx_L3:;

    +0466:                 set_syserr_cb(self._handle_syserr)

          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_syserr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 466, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(__pyx_t_4, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0467:

     0468:         # Mark as not destroyed

    +0469:         libev.ev_set_userdata(self._ptr, self._ptr)

      ev_set_userdata(__pyx_v_self->_ptr, __pyx_v_self->_ptr);

     0470:

    +0471:         libev.ev_prepare_start(self._ptr, &self._prepare)

      ev_prepare_start(__pyx_v_self->_ptr, (&__pyx_v_self->_prepare));

    +0472:         libev.ev_unref(self._ptr)

      ev_unref(__pyx_v_self->_ptr);

     0473:

    +0474:         libev.ev_async_start(self._ptr, &self._threadsafe_async)

      ev_async_start(__pyx_v_self->_ptr, (&__pyx_v_self->_threadsafe_async));

    +0475:         libev.ev_unref(self._ptr)

      ev_unref(__pyx_v_self->_ptr);

     0476:

     0477:

    +0478:     def __init__(self, object flags=None, object default=None, libev.intptr_t ptr=0):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_4loop_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED PyObject *__pyx_v_flags = 0;
      CYTHON_UNUSED PyObject *__pyx_v_default = 0;
      CYTHON_UNUSED intptr_t __pyx_v_ptr;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flags_2,&__pyx_n_s_default,&__pyx_n_s_ptr,0};
      PyObject* values[3] = {0,0,0};
        values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flags_2);
              if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
              if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ptr);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 478, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_flags = values[0];
        __pyx_v_default = values[1];
        if (values[2]) {
          __pyx_v_ptr = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_ptr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L3_error)
        } else {
          __pyx_v_ptr = ((intptr_t)0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 478, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_2__init__(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_flags, __pyx_v_default, __pyx_v_ptr);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_4loop_2__init__(struct PyGeventLoopObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_flags, CYTHON_UNUSED PyObject *__pyx_v_default, CYTHON_UNUSED intptr_t __pyx_v_ptr) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0479:         self._callbacks = CallbackFIFO()

      __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_CallbackFIFO)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->_callbacks);
      __Pyx_DECREF((PyObject *)__pyx_v_self->_callbacks);
      __pyx_v_self->_callbacks = ((struct __pyx_obj_6gevent_5libev_8corecext_CallbackFIFO *)__pyx_t_1);
      __pyx_t_1 = 0;

     0480:         # See libev.corecffi for this attribute.

    +0481:         self.approx_timer_resolution = 0.00001

      __pyx_v_self->approx_timer_resolution = 0.00001;

     0482:

    +0483:     cdef _run_callbacks(self):

    static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__run_callbacks(struct PyGeventLoopObject *__pyx_v_self) {
      struct PyGeventCallbackObject *__pyx_v_cb = 0;
      int __pyx_v_count;
      ev_tstamp __pyx_v_now;
      ev_tstamp __pyx_v_expiration;
      PyObject *__pyx_v_cb_callable = 0;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.loop._run_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_cb);
      __Pyx_XDECREF(__pyx_v_cb_callable);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0484:         cdef callback cb

    +0485:         cdef int count = CALLBACK_CHECK_COUNT

      __pyx_v_count = CALLBACK_CHECK_COUNT;

    +0486:         self.starting_timer_may_update_loop_time = True

      __pyx_v_self->starting_timer_may_update_loop_time = 1;

    +0487:         cdef libev.ev_tstamp now = libev.ev_now(self._ptr)

      __pyx_v_now = ev_now(__pyx_v_self->_ptr);

    +0488:         cdef libev.ev_tstamp expiration = now + <libev.ev_tstamp>getswitchinterval()

      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getswitchinterval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == ((ev_tstamp)-1)) && PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_expiration = (__pyx_v_now + ((ev_tstamp)__pyx_t_5));

     0489:         cdef object cb_callable # for printing later

    +0490:         assert not PyErr_Occurred()

      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_6 = (!(PyErr_Occurred() != 0));
        if (unlikely(!__pyx_t_6)) {
          __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
          __PYX_ERR(0, 490, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 490, __pyx_L1_error)
      #endif

    +0491:         try:

      /*try:*/ {

    +0492:             libev.ev_timer_stop(self._ptr, &self._timer0)

        ev_timer_stop(__pyx_v_self->_ptr, (&__pyx_v_self->_timer0));

    +0493:             while self._callbacks.head is not None:

        while (1) {
          __pyx_t_6 = (((PyObject *)__pyx_v_self->_callbacks->head) != Py_None);
          if (!__pyx_t_6) break;

    +0494:                 cb = self._callbacks.popleft()

          __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_popleft(__pyx_v_self->_callbacks)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_XDECREF_SET(__pyx_v_cb, ((struct PyGeventCallbackObject *)__pyx_t_1));
          __pyx_t_1 = 0;

    +0495:                 libev.ev_unref(self._ptr)

          ev_unref(__pyx_v_self->_ptr);

     0496:                 # On entry, this will set cb.callback to None,

     0497:                 # changing cb.pending from True to False; on exit,

     0498:                 # this will set cb.args to None, changing bool(cb)

     0499:                 # from True to False.

     0500:                 # XXX: Why is this a C callback, not cython?

    +0501:                 cb_callable = cb.callback

          __pyx_t_1 = __pyx_v_cb->callback;
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_XDECREF_SET(__pyx_v_cb_callable, __pyx_t_1);
          __pyx_t_1 = 0;

    +0502:                 gevent_call(self, cb)

          gevent_call(__pyx_v_self, __pyx_v_cb);

    +0503:                 if PyErr_Occurred():

          __pyx_t_6 = (PyErr_Occurred() != 0);
          if (__pyx_t_6) {

          }

     0504:                     # Exceptions should not escape gevent_call,

     0505:                     # but just in case...

     0506:                     # note we don't use gevent_handle_error here, between

     0507:                     # running callbacks is a fairly fragile state and

     0508:                     # that directs back up to the hub and user code.

    +0509:                     PyErr_WriteUnraisable(cb_callable)

            PyErr_WriteUnraisable(__pyx_v_cb_callable);

    +0510:                     PyErr_Clear()

            PyErr_Clear();

    +0511:                 cb_callable = None

          __Pyx_INCREF(Py_None);
          __Pyx_DECREF_SET(__pyx_v_cb_callable, Py_None);

    +0512:                 count -= 1

          __pyx_v_count = (__pyx_v_count - 1);

     0513:

    +0514:                 if count == 0 and self._callbacks.head is not None:

          __pyx_t_7 = (__pyx_v_count == 0);
          if (__pyx_t_7) {
          } else {
            __pyx_t_6 = __pyx_t_7;
            goto __pyx_L10_bool_binop_done;
          }
          __pyx_t_7 = (((PyObject *)__pyx_v_self->_callbacks->head) != Py_None);
          __pyx_t_6 = __pyx_t_7;
          __pyx_L10_bool_binop_done:;
          if (__pyx_t_6) {

          }
        }
        __pyx_L7_break:;

     0515:                     # We still have more to run but we've reached

     0516:                     # the end of one check group

    +0517:                     count = CALLBACK_CHECK_COUNT

            __pyx_v_count = CALLBACK_CHECK_COUNT;

     0518:

    +0519:                     libev.ev_now_update(self._ptr)

            ev_now_update(__pyx_v_self->_ptr);

    +0520:                     if libev.ev_now(self._ptr) >= expiration:

            __pyx_t_6 = (ev_now(__pyx_v_self->_ptr) >= __pyx_v_expiration);
            if (__pyx_t_6) {

            }

    +0521:                         now = 0

              __pyx_v_now = 0.0;

    +0522:                         break

              goto __pyx_L7_break;

     0523:

    +0524:             if now != 0:

        __pyx_t_6 = (__pyx_v_now != 0.0);
        if (__pyx_t_6) {

        }

    +0525:                 libev.ev_now_update(self._ptr)

          ev_now_update(__pyx_v_self->_ptr);

    +0526:             if self._callbacks.head is not None:

        __pyx_t_6 = (((PyObject *)__pyx_v_self->_callbacks->head) != Py_None);
        if (__pyx_t_6) {

        }
      }

    +0527:                 libev.ev_timer_start(self._ptr, &self._timer0)

          ev_timer_start(__pyx_v_self->_ptr, (&__pyx_v_self->_timer0));

     0528:         finally:

    +0529:             self.starting_timer_may_update_loop_time = False

      /*finally:*/ {
        /*normal exit:*/{
          __pyx_v_self->starting_timer_may_update_loop_time = 0;
          goto __pyx_L5;
        }
        __pyx_L4_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          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);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
          {
            __pyx_v_self->starting_timer_may_update_loop_time = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          }
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
          __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }

     0530:

    +0531:     cdef _stop_watchers(self, libev.ev_loop* ptr):

    static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__stop_watchers(struct PyGeventLoopObject *__pyx_v_self, struct ev_loop *__pyx_v_ptr) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0532:         if not ptr:

      __pyx_t_1 = (!(__pyx_v_ptr != 0));
      if (__pyx_t_1) {

      }

    +0533:             return

        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

     0534:

    +0535:         if libev.ev_is_active(&self._prepare):

      __pyx_t_1 = (ev_is_active((&__pyx_v_self->_prepare)) != 0);
      if (__pyx_t_1) {

      }

    +0536:             libev.ev_ref(ptr)

        ev_ref(__pyx_v_ptr);

    +0537:             libev.ev_prepare_stop(ptr, &self._prepare)

        ev_prepare_stop(__pyx_v_ptr, (&__pyx_v_self->_prepare));

    +0538:         if libev.ev_is_active(&self._periodic_signal_checker):

      __pyx_t_1 = (ev_is_active((&__pyx_v_self->_periodic_signal_checker)) != 0);
      if (__pyx_t_1) {

      }

    +0539:             libev.ev_ref(ptr)

        ev_ref(__pyx_v_ptr);

    +0540:             libev.ev_timer_stop(ptr, &self._periodic_signal_checker)

        ev_timer_stop(__pyx_v_ptr, (&__pyx_v_self->_periodic_signal_checker));

    +0541:         if libev.ev_is_active(&self._threadsafe_async):

      __pyx_t_1 = (ev_is_active((&__pyx_v_self->_threadsafe_async)) != 0);
      if (__pyx_t_1) {

      }

    +0542:             libev.ev_ref(ptr)

        ev_ref(__pyx_v_ptr);

    +0543:             libev.ev_async_stop(ptr, &self._threadsafe_async)

        ev_async_stop(__pyx_v_ptr, (&__pyx_v_self->_threadsafe_async));

     0544:

    +0545:     def destroy(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_5destroy = {"destroy", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_5destroy, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_4destroy(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_4destroy(struct PyGeventLoopObject *__pyx_v_self) {
      struct ev_loop *__pyx_v_ptr;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ptr); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__35);
      __Pyx_GIVEREF(__pyx_tuple__35);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_5destroy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_destroy, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_destroy, __pyx_t_3) < 0) __PYX_ERR(0, 545, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_destroy, 545, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 545, __pyx_L1_error)

    +0546:         cdef libev.ev_loop* ptr = self._ptr

      __pyx_t_1 = __pyx_v_self->_ptr;
      __pyx_v_ptr = __pyx_t_1;

    +0547:         self._ptr = NULL

      __pyx_v_self->_ptr = NULL;

     0548:

    +0549:         if ptr:

      __pyx_t_2 = (__pyx_v_ptr != 0);
      if (__pyx_t_2) {

      }

    +0550:             if not libev.ev_userdata(ptr):

        __pyx_t_2 = (!(ev_userdata(__pyx_v_ptr) != 0));
        if (__pyx_t_2) {

        }

     0551:                 # Whoops! Program error. They destroyed the loop,

     0552:                 # using a different loop object. Our _ptr is still

     0553:                 # valid, but the libev loop is gone. Doing anything

     0554:                 # else with it will likely cause a crash.

    +0555:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     0556:             # Mark as destroyed

    +0557:             self._stop_watchers(ptr)

        __pyx_t_3 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_vtab)->_stop_watchers(__pyx_v_self, __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0558:             libev.ev_set_userdata(ptr, NULL)

        ev_set_userdata(__pyx_v_ptr, NULL);

    +0559:             if SYSERR_CALLBACK == self._handle_syserr:

        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_syserr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PyObject_RichCompare(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 559, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_2) {

        }

    +0560:                 set_syserr_cb(None)

          __pyx_t_4 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(Py_None, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +0561:             libev.ev_loop_destroy(ptr)

        ev_loop_destroy(__pyx_v_ptr);

     0562:

    +0563:     def __dealloc__(self):

    /* Python wrapper */
    static void __pyx_pw_6gevent_5libev_8corecext_4loop_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
    static void __pyx_pw_6gevent_5libev_8corecext_4loop_7__dealloc__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_pf_6gevent_5libev_8corecext_4loop_6__dealloc__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
    }

    static void __pyx_pf_6gevent_5libev_8corecext_4loop_6__dealloc__(struct PyGeventLoopObject *__pyx_v_self) {
      struct ev_loop *__pyx_v_ptr;

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_WriteUnraisable("gevent.libev.corecext.loop.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
    }

    +0564:         cdef libev.ev_loop* ptr = self._ptr

      __pyx_t_1 = __pyx_v_self->_ptr;
      __pyx_v_ptr = __pyx_t_1;

    +0565:         self._ptr = NULL

      __pyx_v_self->_ptr = NULL;

    +0566:         if ptr != NULL:

      __pyx_t_2 = (__pyx_v_ptr != NULL);
      if (__pyx_t_2) {

      }

    +0567:             if not libev.ev_userdata(ptr):

        __pyx_t_2 = (!(ev_userdata(__pyx_v_ptr) != 0));
        if (__pyx_t_2) {

        }

     0568:                 # See destroy(). This is a bug in the caller.

    +0569:                 return

          goto __pyx_L0;

    +0570:             self._stop_watchers(ptr)

        __pyx_t_3 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_vtab)->_stop_watchers(__pyx_v_self, __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0571:             if not self._default:

        __pyx_t_2 = (!__pyx_v_self->_default);
        if (__pyx_t_2) {

        }

    +0572:                 libev.ev_loop_destroy(ptr)

          ev_loop_destroy(__pyx_v_ptr);

     0573:                 # Mark as destroyed

    +0574:                 libev.ev_set_userdata(ptr, NULL)

          ev_set_userdata(__pyx_v_ptr, NULL);

     0575:

    +0576:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_3ptr_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_3ptr_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_3ptr___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_3ptr___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0577:     def ptr(self):

    +0578:         return <size_t>self._ptr

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_FromSize_t(((size_t)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0579:

    +0580:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11WatcherType_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11WatcherType_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_11WatcherType___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11WatcherType___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0581:     def WatcherType(self):

    +0582:         return watcher

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher);
      __pyx_r = ((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher);
      goto __pyx_L0;

     0583:

    +0584:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MAXPRI_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MAXPRI_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_6MAXPRI___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_6MAXPRI___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.MAXPRI.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0585:     def MAXPRI(self):

    +0586:         return libev.EV_MAXPRI

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_int(EV_MAXPRI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0587:

    +0588:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MINPRI_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MINPRI_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_6MINPRI___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_6MINPRI___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.MINPRI.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0589:     def MINPRI(self):

    +0590:         return libev.EV_MINPRI

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_int(EV_MINPRI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0591:

    +0592:     def _handle_syserr(self, message, errno):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9_handle_syserr(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_9_handle_syserr = {"_handle_syserr", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_9_handle_syserr, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9_handle_syserr(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_message = 0;
      PyObject *__pyx_v_errno = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_handle_syserr (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_message,&__pyx_n_s_errno,0};
      PyObject* values[2] = {0,0};
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_message)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 592, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_errno)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 592, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("_handle_syserr", 1, 2, 2, 1); __PYX_ERR(0, 592, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_handle_syserr") < 0)) __PYX_ERR(0, 592, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
          values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        }
        __pyx_v_message = values[0];
        __pyx_v_errno = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_handle_syserr", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 592, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop._handle_syserr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_8_handle_syserr(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_message, __pyx_v_errno);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_8_handle_syserr(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
      PyObject *__pyx_r = NULL;
      __Pyx_INCREF(__pyx_v_message);

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("gevent.libev.corecext.loop._handle_syserr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_message);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__37);
      __Pyx_GIVEREF(__pyx_tuple__37);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_9_handle_syserr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop__handle_syserr, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_handle_syserr, __pyx_t_3) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_handle_syserr, 592, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 592, __pyx_L1_error)

    +0593:         if sys.version_info[0] >= 3:

      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 593, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_3) {

      }

    +0594:             message = message.decode()

        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_2);
        __pyx_t_2 = 0;

    +0595:         self.handle_error(None, SystemError, SystemError(message + ': ' + os.strerror(errno)), None)

      __pyx_t_2 = PyNumber_Add(__pyx_v_message, __pyx_kp_s__8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strerror); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_errno};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_SystemError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_vtab)->handle_error(__pyx_v_self, Py_None, __pyx_builtin_SystemError, __pyx_t_1, Py_None, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

     0596:

    +0597:     cpdef handle_error(self, context, type, value, tb):

    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop_handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb, int __pyx_skip_dispatch) {
      PyObject *__pyx_v_handle_error = 0;
      PyObject *__pyx_v_error_handler = 0;
      PyObject *__pyx_r = NULL;
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error)) {
            __Pyx_XDECREF(__pyx_r);
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
            __pyx_t_5 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_5 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_handle_error);
      __Pyx_XDECREF(__pyx_v_error_handler);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_11handle_error = {"handle_error", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_context = 0;
      PyObject *__pyx_v_type = 0;
      PyObject *__pyx_v_value = 0;
      PyObject *__pyx_v_tb = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("handle_error (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_context,&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_tb,0};
      PyObject* values[4] = {0,0,0,0};
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_type)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("handle_error", 1, 4, 4, 1); __PYX_ERR(0, 597, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("handle_error", 1, 4, 4, 2); __PYX_ERR(0, 597, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tb)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("handle_error", 1, 4, 4, 3); __PYX_ERR(0, 597, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "handle_error") < 0)) __PYX_ERR(0, 597, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs != 4)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
          values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
          values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
          values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        }
        __pyx_v_context = values[0];
        __pyx_v_type = values[1];
        __pyx_v_value = values[2];
        __pyx_v_tb = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("handle_error", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 597, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10handle_error(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_4loop_handle_error(__pyx_v_self, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__39 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_context, __pyx_n_s_type, __pyx_n_s_value, __pyx_n_s_tb); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__39);
      __Pyx_GIVEREF(__pyx_tuple__39);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_11handle_error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_handle_error, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_handle_error, __pyx_t_3) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_handle_error, 597, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 597, __pyx_L1_error)

     0598:         cdef object handle_error

    +0599:         cdef object error_handler = self.error_handler

      __pyx_t_1 = __pyx_v_self->error_handler;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_error_handler = __pyx_t_1;
      __pyx_t_1 = 0;

    +0600:         if type is HubDestroyed:

      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_HubDestroyed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = (__pyx_v_type == __pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

      }

    +0601:             self._callbacks.clear()

        __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_clear(__pyx_v_self->_callbacks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0602:             self.break_()

        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_break); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0603:             return

        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

     0604:

    +0605:         if error_handler is not None:

      __pyx_t_6 = (__pyx_v_error_handler != Py_None);
      if (__pyx_t_6) {

        goto __pyx_L4;
      }

     0606:             # we do want to do getattr every time so that setting Hub.handle_error property just works

    +0607:             handle_error = getattr(error_handler, 'handle_error', error_handler)

        __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_error_handler, __pyx_n_s_handle_error, __pyx_v_error_handler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_handle_error = __pyx_t_1;
        __pyx_t_1 = 0;

    +0608:             handle_error(context, type, value, tb)

        __Pyx_INCREF(__pyx_v_handle_error);
        __pyx_t_2 = __pyx_v_handle_error; __pyx_t_3 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0609:         else:

    +0610:             self._default_handle_error(context, type, value, tb)

      /*else*/ {
        __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_vtab)->_default_handle_error(__pyx_v_self, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L4:;

     0611:

    +0612:     cpdef _default_handle_error(self, context, type, value, tb):

    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__default_handle_error(struct PyGeventLoopObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb, int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default_handle_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error)) {
            __Pyx_XDECREF(__pyx_r);
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
            __pyx_t_5 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_5 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent.libev.corecext.loop._default_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_13_default_handle_error = {"_default_handle_error", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_context = 0;
      PyObject *__pyx_v_type = 0;
      PyObject *__pyx_v_value = 0;
      PyObject *__pyx_v_tb = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_default_handle_error (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_context,&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_tb,0};
      PyObject* values[4] = {0,0,0,0};
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_context)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_type)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("_default_handle_error", 1, 4, 4, 1); __PYX_ERR(0, 612, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("_default_handle_error", 1, 4, 4, 2); __PYX_ERR(0, 612, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tb)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("_default_handle_error", 1, 4, 4, 3); __PYX_ERR(0, 612, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_default_handle_error") < 0)) __PYX_ERR(0, 612, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs != 4)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
          values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
          values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
          values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        }
        __pyx_v_context = values[0];
        __pyx_v_type = values[1];
        __pyx_v_value = values[2];
        __pyx_v_tb = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_default_handle_error", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 612, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop._default_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_12_default_handle_error(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_12_default_handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_4loop__default_handle_error(__pyx_v_self, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.loop._default_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_13_default_handle_error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop__default_handle_error, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_default_handle_error, __pyx_t_3) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_default_handle_error, 612, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 612, __pyx_L1_error)

     0613:         # note: Hub sets its own error handler so this is not used by gevent

     0614:         # this is here to make core.loop usable without the rest of gevent

    +0615:         traceback.print_exception(type, value, tb)

      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_traceback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_print_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0616:         if self._ptr:

      __pyx_t_6 = (__pyx_v_self->_ptr != 0);
      if (__pyx_t_6) {

      }

    +0617:             libev.ev_break(self._ptr, libev.EVBREAK_ONE)

        ev_break(__pyx_v_self->_ptr, EVBREAK_ONE);

     0618:

    +0619:     def run(self, nowait=False, once=False):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_15run(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_15run = {"run", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_15run, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_15run(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_nowait = 0;
      PyObject *__pyx_v_once = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("run (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nowait,&__pyx_n_s_once,0};
      PyObject* values[2] = {0,0};
        values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
        values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nowait);
              if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 619, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_once);
              if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 619, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "run") < 0)) __PYX_ERR(0, 619, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_nowait = values[0];
        __pyx_v_once = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("run", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 619, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_14run(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_nowait, __pyx_v_once);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_14run(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_nowait, PyObject *__pyx_v_once) {
      unsigned int __pyx_v_flags;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.loop.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__42 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_nowait, __pyx_n_s_once, __pyx_n_s_flags_2); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__42);
      __Pyx_GIVEREF(__pyx_tuple__42);
      __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_run, 619, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 619, __pyx_L1_error)

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_15run, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_run, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__44);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_run, __pyx_t_3) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_tuple__44 = PyTuple_Pack(2, Py_False, Py_False); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__44);
      __Pyx_GIVEREF(__pyx_tuple__44);

    +0620:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 620, __pyx_L1_error)

    +0621:         cdef unsigned int flags = 0

      __pyx_v_flags = 0;

    +0622:         if nowait:

      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_nowait); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 622, __pyx_L1_error)
      if (__pyx_t_1) {

      }

    +0623:             flags |= libev.EVRUN_NOWAIT

        __pyx_v_flags = (__pyx_v_flags | EVRUN_NOWAIT);

    +0624:         if once:

      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_once); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 624, __pyx_L1_error)
      if (__pyx_t_1) {

      }

    +0625:             flags |= libev.EVRUN_ONCE

        __pyx_v_flags = (__pyx_v_flags | EVRUN_ONCE);

    +0626:         with nogil:

      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          _save = NULL;
          Py_UNBLOCK_THREADS
          __Pyx_FastGIL_Remember();
          #endif
          /*try:*/ {

          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              __Pyx_FastGIL_Forget();
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L7;
            }
            __pyx_L7:;
          }
      }

    +0627:             libev.ev_run(self._ptr, flags)

            ev_run(__pyx_v_self->_ptr, __pyx_v_flags);
          }

     0628:

    +0629:     def reinit(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_17reinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_17reinit = {"reinit", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_17reinit, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_17reinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("reinit (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_16reinit(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_16reinit(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_17reinit, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_reinit, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_reinit, __pyx_t_3) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_reinit, 629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 629, __pyx_L1_error)

    +0630:         if self._ptr:

      __pyx_t_1 = (__pyx_v_self->_ptr != 0);
      if (__pyx_t_1) {

      }

    +0631:             libev.ev_loop_fork(self._ptr)

        ev_loop_fork(__pyx_v_self->_ptr);

     0632:

    +0633:     def ref(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_19ref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_19ref = {"ref", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_19ref, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_19ref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("ref (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_18ref(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_18ref(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.loop.ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_19ref, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_ref, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_ref, __pyx_t_3) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_ref, 633, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 633, __pyx_L1_error)

    +0634:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 634, __pyx_L1_error)

    +0635:         libev.ev_ref(self._ptr)

      ev_ref(__pyx_v_self->_ptr);

     0636:

    +0637:     def unref(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_21unref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_21unref = {"unref", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_21unref, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_21unref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("unref (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_20unref(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_20unref(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.loop.unref", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_21unref, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_unref, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_unref, __pyx_t_3) < 0) __PYX_ERR(0, 637, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_unref, 637, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 637, __pyx_L1_error)

    +0638:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 638, __pyx_L1_error)

    +0639:         libev.ev_unref(self._ptr)

      ev_unref(__pyx_v_self->_ptr);

     0640:

    +0641:     def break_(self, int how=libev.EVBREAK_ONE):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_23break_(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_23break_ = {"break_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_23break_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_23break_(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      int __pyx_v_how;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("break_ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_how,0};
      PyObject* values[1] = {0};
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_how);
              if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "break_") < 0)) __PYX_ERR(0, 641, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        if (values[0]) {
          __pyx_v_how = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_how == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L3_error)
        } else {
          __pyx_v_how = __pyx_k__9;
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("break_", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 641, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.break_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_22break_(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_how);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_22break_(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_how) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.loop.break_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_k__9 = EVBREAK_ONE;

      __pyx_tuple__48 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_how); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 641, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__48);
      __Pyx_GIVEREF(__pyx_tuple__48);
      __pyx_t_3 = __Pyx_PyInt_From_int(EVBREAK_ONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 641, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_23break_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_break, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_19);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_break, __pyx_t_3) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_break, 641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 641, __pyx_L1_error)

    +0642:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 642, __pyx_L1_error)

    +0643:         libev.ev_break(self._ptr, how)

      ev_break(__pyx_v_self->_ptr, __pyx_v_how);

     0644:

    +0645:     def verify(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_25verify(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_25verify = {"verify", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_25verify, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_25verify(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("verify (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_24verify(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_24verify(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.loop.verify", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_25verify, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_verify, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_verify, __pyx_t_3) < 0) __PYX_ERR(0, 645, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_verify, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 645, __pyx_L1_error)

    +0646:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 646, __pyx_L1_error)

    +0647:         libev.ev_verify(self._ptr)

      ev_verify(__pyx_v_self->_ptr);

     0648:

    +0649:     cpdef libev.ev_tstamp now(self) except *:

    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_27now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static ev_tstamp __pyx_f_6gevent_5libev_8corecext_4loop_now(struct PyGeventLoopObject *__pyx_v_self, int __pyx_skip_dispatch) {
      ev_tstamp __pyx_r;
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_now); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6gevent_5libev_8corecext_4loop_27now)) {
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
            __pyx_t_5 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_5 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == ((ev_tstamp)-1)) && PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_r = __pyx_t_6;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_27now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_27now = {"now", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_27now, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_27now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("now (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_26now(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_26now(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_4loop_now(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L1_error)
      __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_27now, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_now, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_now, __pyx_t_3) < 0) __PYX_ERR(0, 649, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_now, 649, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 649, __pyx_L1_error)

    +0650:         _check_loop(self)

      __pyx_t_7 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 650, __pyx_L1_error)

    +0651:         return libev.ev_now(self._ptr)

      __pyx_r = ev_now(__pyx_v_self->_ptr);
      goto __pyx_L0;

     0652:

    +0653:     cpdef void update_now(self) except *:

    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_29update_now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static void __pyx_f_6gevent_5libev_8corecext_4loop_update_now(struct PyGeventLoopObject *__pyx_v_self, int __pyx_skip_dispatch) {
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_update_now); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_6gevent_5libev_8corecext_4loop_29update_now)) {
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
            __pyx_t_5 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_5 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.update_now", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_29update_now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_29update_now = {"update_now", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_29update_now, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_29update_now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("update_now (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_28update_now(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_28update_now(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_f_6gevent_5libev_8corecext_4loop_update_now(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 653, __pyx_L1_error)
      __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.update_now", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_29update_now, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_update_now, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_update_now, __pyx_t_3) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_update_now, 653, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 653, __pyx_L1_error)

    +0654:         _check_loop(self)

      __pyx_t_6 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 654, __pyx_L1_error)

    +0655:         libev.ev_now_update(self._ptr)

      ev_now_update(__pyx_v_self->_ptr);

     0656:

    +0657:     update = update_now # Old name, deprecated.

      __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_update_now); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_update, __pyx_t_3) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

     0658:

    +0659:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_31__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_31__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_30__repr__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_30__repr__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0660:         return '<%s at 0x%x %s>' % (self.__class__.__name__, id(self), self._format())

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_1 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_at_0x_x_s_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

     0661:

    +0662:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7default_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7default_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_7default___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_7default___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.default.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0663:     def default(self):

     0664:         # If we're destroyed, we are not the default loop anymore,

     0665:         # as far as Python is concerned.

    +0666:         return self._default if self._ptr else False

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_self->_ptr != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_False);
        __pyx_t_1 = Py_False;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0667:

    +0668:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9iteration_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9iteration_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_9iteration___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9iteration___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.iteration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0669:     def iteration(self):

    +0670:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 670, __pyx_L1_error)

    +0671:         return libev.ev_iteration(self._ptr)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(ev_iteration(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0672:

    +0673:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5depth_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5depth_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_5depth___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_5depth___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.depth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0674:     def depth(self):

    +0675:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 675, __pyx_L1_error)

    +0676:         return libev.ev_depth(self._ptr)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(ev_depth(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0677:

    +0678:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11backend_int_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11backend_int_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_11backend_int___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11backend_int___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.backend_int.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0679:     def backend_int(self):

    +0680:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 680, __pyx_L1_error)

    +0681:         return libev.ev_backend(self._ptr)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(ev_backend(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0682:

    +0683:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7backend_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7backend_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_7backend___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_7backend___get__(struct PyGeventLoopObject *__pyx_v_self) {
      unsigned int __pyx_v_backend;
      PyObject *__pyx_v_key = NULL;
      PyObject *__pyx_v_value = NULL;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.backend.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_key);
      __Pyx_XDECREF(__pyx_v_value);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0684:     def backend(self):

    +0685:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 685, __pyx_L1_error)

    +0686:         cdef unsigned int backend = libev.ev_backend(self._ptr)

      __pyx_v_backend = ev_backend(__pyx_v_self->_ptr);

    +0687:         for key, value in _flags:

      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = 0;
        __pyx_t_5 = NULL;
      } else {
        __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 687, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_5)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 687, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __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(0, 687, __pyx_L1_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 687, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 687, __pyx_L1_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_5(__pyx_t_3);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 687, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
          PyObject* sequence = __pyx_t_2;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 687, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
          } else {
            __pyx_t_6 = PyList_GET_ITEM(sequence, 0);
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1);
          }
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          #else
          __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 687, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 687, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 687, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
          index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 687, __pyx_L1_error)
          __pyx_t_9 = NULL;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L6_unpacking_done;
          __pyx_L5_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_9 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 687, __pyx_L1_error)
          __pyx_L6_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
        __pyx_t_6 = 0;
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
        __pyx_t_7 = 0;

      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0688:             if key == backend:

        __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_backend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_key, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 688, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 688, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_1) {

        }

    +0689:                 return value

          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_v_value);
          __pyx_r = __pyx_v_value;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L0;

    +0690:         return backend

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_backend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

     0691:

    +0692:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10pendingcnt_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10pendingcnt_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10pendingcnt___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10pendingcnt___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.pendingcnt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0693:     def pendingcnt(self):

    +0694:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 694, __pyx_L1_error)

    +0695:         return libev.ev_pending_count(self._ptr)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(ev_pending_count(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0696:

    +0697:     def io(self, libev.vfd_socket_t fd, int events, ref=True, priority=None):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_33io(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_33io = {"io", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_33io, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_33io(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      vfd_socket_t __pyx_v_fd;
      int __pyx_v_events;
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("io (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_events_2,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[4] = {0,0,0,0};
        values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
        values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fd)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_events_2)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("io", 0, 2, 4, 1); __PYX_ERR(0, 697, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "io") < 0)) __PYX_ERR(0, 697, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_fd = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_fd == ((vfd_socket_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L3_error)
        __pyx_v_events = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L3_error)
        __pyx_v_ref = values[2];
        __pyx_v_priority = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("io", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 697, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.io", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_32io(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_fd, __pyx_v_events, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_32io(struct PyGeventLoopObject *__pyx_v_self, vfd_socket_t __pyx_v_fd, int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.io", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__53 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_fd, __pyx_n_s_events_2, __pyx_n_s_ref, __pyx_n_s_priority); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 697, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__53);
      __Pyx_GIVEREF(__pyx_tuple__53);
      __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_io, 697, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 697, __pyx_L1_error)

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_33io, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_io, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__55);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_io, __pyx_t_3) < 0) __PYX_ERR(0, 697, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_tuple__55 = PyTuple_Pack(2, Py_True, Py_None); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 697, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__55);
      __Pyx_GIVEREF(__pyx_tuple__55);

    +0698:         return io(self, fd, events, ref, priority)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 698, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_ref);
      __Pyx_GIVEREF(__pyx_v_ref);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_ref)) __PYX_ERR(0, 698, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_priority);
      __Pyx_GIVEREF(__pyx_v_priority);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_priority)) __PYX_ERR(0, 698, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_io), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0699:

    +0700:     def closing_fd(self, libev.vfd_socket_t fd):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_35closing_fd(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_35closing_fd = {"closing_fd", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_35closing_fd, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_35closing_fd(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd) {
      vfd_socket_t __pyx_v_fd;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("closing_fd (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      assert(__pyx_arg_fd); {
        __pyx_v_fd = __Pyx_PyIndex_AsSsize_t(__pyx_arg_fd); if (unlikely((__pyx_v_fd == ((vfd_socket_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L3_error)
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.loop.closing_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_34closing_fd(((struct PyGeventLoopObject *)__pyx_v_self), ((vfd_socket_t)__pyx_v_fd));
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_34closing_fd(struct PyGeventLoopObject *__pyx_v_self, vfd_socket_t __pyx_v_fd) {
      int __pyx_v_pending_before;
      int __pyx_v_pending_after;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.closing_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__56 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_fd, __pyx_n_s_fd, __pyx_n_s_pending_before, __pyx_n_s_pending_after); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__56);
      __Pyx_GIVEREF(__pyx_tuple__56);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_35closing_fd, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_closing_fd, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_closing_fd, __pyx_t_3) < 0) __PYX_ERR(0, 700, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_closing_fd, 700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 700, __pyx_L1_error)

    +0701:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 701, __pyx_L1_error)

    +0702:         cdef int pending_before = libev.ev_pending_count(self._ptr)

      __pyx_v_pending_before = ev_pending_count(__pyx_v_self->_ptr);

    +0703:         libev.ev_feed_fd_event(self._ptr, fd, 0xFFFF)

      ev_feed_fd_event(__pyx_v_self->_ptr, __pyx_v_fd, 0xFFFF);

    +0704:         cdef int pending_after = libev.ev_pending_count(self._ptr)

      __pyx_v_pending_after = ev_pending_count(__pyx_v_self->_ptr);

    +0705:         return pending_after > pending_before

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_pending_after > __pyx_v_pending_before)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0706:

    +0707:     def timer(self, double after, double repeat=0.0, ref=True, priority=None):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_37timer(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_37timer = {"timer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_37timer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_37timer(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      double __pyx_v_after;
      double __pyx_v_repeat;
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("timer (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_after,&__pyx_n_s_repeat,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[4] = {0,0,0,0};
        values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
        values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_after)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_repeat);
              if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "timer") < 0)) __PYX_ERR(0, 707, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_after = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_after == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L3_error)
        if (values[1]) {
          __pyx_v_repeat = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_repeat == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L3_error)
        } else {
          __pyx_v_repeat = ((double)0.0);
        }
        __pyx_v_ref = values[2];
        __pyx_v_priority = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("timer", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 707, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.timer", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_36timer(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_after, __pyx_v_repeat, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_36timer(struct PyGeventLoopObject *__pyx_v_self, double __pyx_v_after, double __pyx_v_repeat, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.timer", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__58 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_after, __pyx_n_s_repeat, __pyx_n_s_ref, __pyx_n_s_priority); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__58);
      __Pyx_GIVEREF(__pyx_tuple__58);
      __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_timer, 707, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 707, __pyx_L1_error)

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_37timer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_timer, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__60);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_timer, __pyx_t_3) < 0) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_tuple__60 = PyTuple_Pack(3, __pyx_float_0_0, Py_True, Py_None); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__60);
      __Pyx_GIVEREF(__pyx_tuple__60);

    +0708:         return timer(self, after, repeat, ref, priority)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyFloat_FromDouble(__pyx_v_after); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_repeat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 708, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_ref);
      __Pyx_GIVEREF(__pyx_v_ref);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_ref)) __PYX_ERR(0, 708, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_priority);
      __Pyx_GIVEREF(__pyx_v_priority);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_priority)) __PYX_ERR(0, 708, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_timer), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0709:

    +0710:     def signal(self, int signum, ref=True, priority=None):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_39signal(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_39signal = {"signal", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_39signal, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_39signal(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      int __pyx_v_signum;
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("signal (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signum,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[3] = {0,0,0};
        values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
        values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signum)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "signal") < 0)) __PYX_ERR(0, 710, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_signum = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_signum == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L3_error)
        __pyx_v_ref = values[1];
        __pyx_v_priority = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("signal", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 710, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.signal", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_38signal(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_signum, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_38signal(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_signum, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.signal", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__61 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_signum, __pyx_n_s_ref, __pyx_n_s_priority); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__61);
      __Pyx_GIVEREF(__pyx_tuple__61);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_39signal, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_signal, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__55);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_signal, __pyx_t_3) < 0) __PYX_ERR(0, 710, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_signal, 710, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 710, __pyx_L1_error)

    +0711:         return signal(self, signum, ref, priority)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_signum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 711, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_ref);
      __Pyx_GIVEREF(__pyx_v_ref);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ref)) __PYX_ERR(0, 711, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_priority);
      __Pyx_GIVEREF(__pyx_v_priority);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_priority)) __PYX_ERR(0, 711, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_signal), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0712:

    +0713:     def idle(self, ref=True, priority=None):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_41idle(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_41idle = {"idle", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_41idle, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_41idle(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("idle (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[2] = {0,0};
        values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
        values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 713, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 713, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "idle") < 0)) __PYX_ERR(0, 713, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_ref = values[0];
        __pyx_v_priority = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("idle", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 713, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.idle", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_40idle(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_40idle(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.idle", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__63 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_ref, __pyx_n_s_priority); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 713, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__63);
      __Pyx_GIVEREF(__pyx_tuple__63);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_41idle, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_idle, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__55);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_idle, __pyx_t_3) < 0) __PYX_ERR(0, 713, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_idle, 713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 713, __pyx_L1_error)

    +0714:         return idle(self, ref, priority)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 714, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_ref);
      __Pyx_GIVEREF(__pyx_v_ref);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref)) __PYX_ERR(0, 714, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_priority);
      __Pyx_GIVEREF(__pyx_v_priority);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_priority)) __PYX_ERR(0, 714, __pyx_L1_error);
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_idle), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0715:

    +0716:     def prepare(self, ref=True, priority=None):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_43prepare(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_43prepare = {"prepare", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_43prepare, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_43prepare(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("prepare (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[2] = {0,0};
        values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
        values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "prepare") < 0)) __PYX_ERR(0, 716, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_ref = values[0];
        __pyx_v_priority = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("prepare", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 716, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_42prepare(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_42prepare(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_43prepare, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_prepare, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__55);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_prepare, __pyx_t_3) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_prepare, 716, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 716, __pyx_L1_error)

    +0717:         return prepare(self, ref, priority)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 717, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_ref);
      __Pyx_GIVEREF(__pyx_v_ref);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref)) __PYX_ERR(0, 717, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_priority);
      __Pyx_GIVEREF(__pyx_v_priority);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_priority)) __PYX_ERR(0, 717, __pyx_L1_error);
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_prepare), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0718:

    +0719:     def check(self, ref=True, priority=None):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_45check(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_45check = {"check", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_45check, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_45check(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("check (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[2] = {0,0};
        values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
        values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 719, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 719, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "check") < 0)) __PYX_ERR(0, 719, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_ref = values[0];
        __pyx_v_priority = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("check", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 719, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.check", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_44check(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_44check(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.check", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_45check, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_check, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 719, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__55);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_check, __pyx_t_3) < 0) __PYX_ERR(0, 719, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_check, 719, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 719, __pyx_L1_error)

    +0720:         return check(self, ref, priority)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 720, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_ref);
      __Pyx_GIVEREF(__pyx_v_ref);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref)) __PYX_ERR(0, 720, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_priority);
      __Pyx_GIVEREF(__pyx_v_priority);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_priority)) __PYX_ERR(0, 720, __pyx_L1_error);
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_check), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0721:

    +0722:     def fork(self, ref=True, priority=None):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_47fork(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_47fork = {"fork", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_47fork, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_47fork(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("fork (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[2] = {0,0};
        values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
        values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fork") < 0)) __PYX_ERR(0, 722, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_ref = values[0];
        __pyx_v_priority = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("fork", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 722, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.fork", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_46fork(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_46fork(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.fork", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_47fork, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_fork, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 722, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__55);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_fork, __pyx_t_3) < 0) __PYX_ERR(0, 722, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_fork, 722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 722, __pyx_L1_error)

    +0723:         return fork(self, ref, priority)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 723, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_ref);
      __Pyx_GIVEREF(__pyx_v_ref);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref)) __PYX_ERR(0, 723, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_priority);
      __Pyx_GIVEREF(__pyx_v_priority);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_priority)) __PYX_ERR(0, 723, __pyx_L1_error);
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_fork), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0724:

    +0725:     def async_(self, ref=True, priority=None):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_49async_(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_49async_ = {"async_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_49async_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_49async_(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("async_ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[2] = {0,0};
        values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
        values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 725, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 725, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "async_") < 0)) __PYX_ERR(0, 725, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_ref = values[0];
        __pyx_v_priority = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("async_", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 725, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.async_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_48async_(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_48async_(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.async_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_49async_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_async, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__55);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_async, __pyx_t_3) < 0) __PYX_ERR(0, 725, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_async, 725, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 725, __pyx_L1_error)

    +0726:         return async_(self, ref, priority)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 726, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_ref);
      __Pyx_GIVEREF(__pyx_v_ref);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref)) __PYX_ERR(0, 726, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_priority);
      __Pyx_GIVEREF(__pyx_v_priority);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_priority)) __PYX_ERR(0, 726, __pyx_L1_error);
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_async_), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0727:

     0728:     # cython doesn't enforce async as a keyword

    +0729:     async = async_

      __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_async); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 729, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_async_2, __pyx_t_3) < 0) __PYX_ERR(0, 729, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

     0730:

    +0731:     def child(self, int pid, bint trace=0, ref=True):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_51child(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_51child = {"child", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_51child, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_51child(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      int __pyx_v_pid;
      int __pyx_v_trace;
      PyObject *__pyx_v_ref = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("child (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pid,&__pyx_n_s_trace,&__pyx_n_s_ref,0};
      PyObject* values[3] = {0,0,0};
        values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pid)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_trace);
              if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "child") < 0)) __PYX_ERR(0, 731, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_pid = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_pid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L3_error)
        if (values[1]) {
          __pyx_v_trace = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_trace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L3_error)
        } else {
          __pyx_v_trace = ((int)0);
        }
        __pyx_v_ref = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("child", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 731, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.child", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_50child(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_pid, __pyx_v_trace, __pyx_v_ref);

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_50child(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_pid, int __pyx_v_trace, PyObject *__pyx_v_ref) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.child", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__69 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_pid, __pyx_n_s_trace, __pyx_n_s_ref); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__69);
      __Pyx_GIVEREF(__pyx_tuple__69);
      __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_child, 731, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 731, __pyx_L1_error)

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_51child, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_child, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__71);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_child, __pyx_t_3) < 0) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_tuple__71 = PyTuple_Pack(2, __pyx_int_0, Py_True); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__71);
      __Pyx_GIVEREF(__pyx_tuple__71);

    +0732:         if sys.platform == 'win32':

      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_platform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_win32, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 732, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_t_3)) {

      }

    +0733:             raise AttributeError("Child watchers are not supported on Windows")

        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 733, __pyx_L1_error)

      __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Child_watchers_are_not_supported); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__10);
      __Pyx_GIVEREF(__pyx_tuple__10);

    +0734:         return child(self, pid, trace, ref)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_pid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_trace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 734, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_ref);
      __Pyx_GIVEREF(__pyx_v_ref);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_ref)) __PYX_ERR(0, 734, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_child), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0735:

    +0736:     def install_sigchld(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_53install_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_53install_sigchld = {"install_sigchld", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_53install_sigchld, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_53install_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("install_sigchld (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_52install_sigchld(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_52install_sigchld(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_53install_sigchld, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_install_sigchld, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_install_sigchld, __pyx_t_3) < 0) __PYX_ERR(0, 736, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_install_sigchld, 736, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 736, __pyx_L1_error)

    +0737:         libev.gevent_install_sigchld_handler()

      gevent_install_sigchld_handler();

     0738:

    +0739:     def reset_sigchld(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_55reset_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_55reset_sigchld = {"reset_sigchld", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_55reset_sigchld, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_55reset_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("reset_sigchld (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_54reset_sigchld(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_54reset_sigchld(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_55reset_sigchld, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_reset_sigchld, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 739, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_reset_sigchld, __pyx_t_3) < 0) __PYX_ERR(0, 739, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_reset_sigchld, 739, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 739, __pyx_L1_error)

    +0740:         libev.gevent_reset_sigchld_handler()

      gevent_reset_sigchld_handler();

     0741:

    +0742:     def stat(self, str path, float interval=0.0, ref=True, priority=None):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_57stat(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_57stat = {"stat", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_57stat, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_57stat(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_path = 0;
      float __pyx_v_interval;
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("stat (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_interval,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[4] = {0,0,0,0};
        values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
        values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_path)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 742, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interval);
              if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 742, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 742, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 742, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "stat") < 0)) __PYX_ERR(0, 742, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_path = ((PyObject*)values[0]);
        if (values[1]) {
          __pyx_v_interval = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_interval == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 742, __pyx_L3_error)
        } else {
          __pyx_v_interval = ((float)0.0);
        }
        __pyx_v_ref = values[2];
        __pyx_v_priority = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("stat", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 742, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.loop.stat", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 742, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_56stat(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_path, __pyx_v_interval, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_56stat(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_path, float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.stat", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__74 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_interval, __pyx_n_s_ref, __pyx_n_s_priority); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__74);
      __Pyx_GIVEREF(__pyx_tuple__74);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_57stat, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_stat, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__60);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_stat, __pyx_t_3) < 0) __PYX_ERR(0, 742, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_stat, 742, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 742, __pyx_L1_error)

    +0743:         return stat(self, path, interval, ref, priority)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyFloat_FromDouble(__pyx_v_interval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 743, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_path);
      __Pyx_GIVEREF(__pyx_v_path);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_path)) __PYX_ERR(0, 743, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_ref);
      __Pyx_GIVEREF(__pyx_v_ref);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_ref)) __PYX_ERR(0, 743, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_priority);
      __Pyx_GIVEREF(__pyx_v_priority);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_priority)) __PYX_ERR(0, 743, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_stat), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0744:

    +0745:     def run_callback(self, func, *args):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_59run_callback(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_59run_callback = {"run_callback", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_59run_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_59run_callback(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_func = 0;
      PyObject *__pyx_v_args = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("run_callback (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
      if (unlikely(!__pyx_v_args)) {
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __Pyx_GOTREF(__pyx_v_args);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,0};
      PyObject* values[1] = {0};
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            default:
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_func)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "run_callback") < 0)) __PYX_ERR(0, 745, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs < 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        }
        __pyx_v_func = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("run_callback", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 745, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
      __Pyx_AddTraceback("gevent.libev.corecext.loop.run_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_58run_callback(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_func, __pyx_v_args);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_DECREF(__pyx_v_args);
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_58run_callback(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_args) {
      struct PyGeventCallbackObject *__pyx_v_cb = 0;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.run_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_cb);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__76 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_func, __pyx_n_s_args, __pyx_n_s_cb); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__76);
      __Pyx_GIVEREF(__pyx_tuple__76);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_59run_callback, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_run_callback, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_run_callback, __pyx_t_3) < 0) __PYX_ERR(0, 745, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_run_callback, 745, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 745, __pyx_L1_error)

    +0746:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 746, __pyx_L1_error)

    +0747:         cdef callback cb = callback(func, args)

      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_func);
      __Pyx_GIVEREF(__pyx_v_func);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_func)) __PYX_ERR(0, 747, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_args);
      __Pyx_GIVEREF(__pyx_v_args);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_args)) __PYX_ERR(0, 747, __pyx_L1_error);
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_callback), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_cb = ((struct PyGeventCallbackObject *)__pyx_t_3);
      __pyx_t_3 = 0;

    +0748:         self._callbacks.append(cb)

      __pyx_t_3 = __pyx_f_6gevent_5libev_8corecext_12CallbackFIFO_append(__pyx_v_self->_callbacks, __pyx_v_cb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0749:         libev.ev_ref(self._ptr)

      ev_ref(__pyx_v_self->_ptr);

    +0750:         return cb

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_cb);
      __pyx_r = ((PyObject *)__pyx_v_cb);
      goto __pyx_L0;

     0751:

    +0752:     def run_callback_threadsafe(self, func, *args):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_61run_callback_threadsafe(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_61run_callback_threadsafe = {"run_callback_threadsafe", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_4loop_61run_callback_threadsafe, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_61run_callback_threadsafe(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_func = 0;
      PyObject *__pyx_v_args = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("run_callback_threadsafe (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
      if (unlikely(!__pyx_v_args)) {
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __Pyx_GOTREF(__pyx_v_args);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,0};
      PyObject* values[1] = {0};
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            default:
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_func)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 752, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "run_callback_threadsafe") < 0)) __PYX_ERR(0, 752, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs < 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        }
        __pyx_v_func = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("run_callback_threadsafe", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 752, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
      __Pyx_AddTraceback("gevent.libev.corecext.loop.run_callback_threadsafe", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_60run_callback_threadsafe(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_func, __pyx_v_args);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_DECREF(__pyx_v_args);
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_60run_callback_threadsafe(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_args) {
      PyObject *__pyx_v_cb = NULL;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.run_callback_threadsafe", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_cb);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_61run_callback_threadsafe, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_run_callback_threadsafe, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_run_callback_threadsafe, __pyx_t_3) < 0) __PYX_ERR(0, 752, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);

      __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_run_callback_threadsafe, 752, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 752, __pyx_L1_error)

     0753:         # We rely on the GIL to make this threadsafe.

    +0754:         cb = self.run_callback(func, *args)

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_run_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_func);
      __Pyx_GIVEREF(__pyx_v_func);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_func)) __PYX_ERR(0, 754, __pyx_L1_error);
      __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_cb = __pyx_t_2;
      __pyx_t_2 = 0;

    +0755:         libev.ev_async_send(self._ptr, &self._threadsafe_async)

      ev_async_send(__pyx_v_self->_ptr, (&__pyx_v_self->_threadsafe_async));

    +0756:         return cb

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_cb);
      __pyx_r = __pyx_v_cb;
      goto __pyx_L0;

     0757:

    +0758:     def _format(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_63_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_63_format = {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_63_format, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_63_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_format (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_62_format(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_62_format(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_v_msg = 0;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent.libev.corecext.loop._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_msg);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__79 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_msg); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 758, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__79);
      __Pyx_GIVEREF(__pyx_tuple__79);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_63_format, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop__format, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 758, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_format, 758, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 758, __pyx_L1_error)

    +0759:         if not self._ptr:

      __pyx_t_1 = (!(__pyx_v_self->_ptr != 0));
      if (__pyx_t_1) {

      }

    +0760:             return 'destroyed'

        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_n_s_destroyed);
        __pyx_r = __pyx_n_s_destroyed;
        goto __pyx_L0;

    +0761:         cdef object msg = self.backend

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_backend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_msg = __pyx_t_2;
      __pyx_t_2 = 0;

    +0762:         if self._default:

      if (__pyx_v_self->_default) {

      }

    +0763:             msg += ' default'

        __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_kp_s_default_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 763, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_2);
        __pyx_t_2 = 0;

    +0764:         msg += ' pending=%s' % self.pendingcnt

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pendingcnt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pending_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_2);
      __pyx_t_2 = 0;

    +0765:         msg += self._format_details()

      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_details); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_3);
      __pyx_t_3 = 0;

    +0766:         return msg

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_msg);
      __pyx_r = __pyx_v_msg;
      goto __pyx_L0;

     0767:

    +0768:     def _format_details(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_65_format_details(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_65_format_details = {"_format_details", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_65_format_details, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_65_format_details(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_format_details (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_64_format_details(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_64_format_details(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_v_msg = 0;
      PyObject *__pyx_v_fileno = 0;
      PyObject *__pyx_v_activecnt = 0;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.loop._format_details", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_msg);
      __Pyx_XDECREF(__pyx_v_fileno);
      __Pyx_XDECREF(__pyx_v_activecnt);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__81 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_msg, __pyx_n_s_fileno, __pyx_n_s_activecnt); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__81);
      __Pyx_GIVEREF(__pyx_tuple__81);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_65_format_details, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop__format_details, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_format_details, __pyx_t_3) < 0) __PYX_ERR(0, 768, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_format_details, 768, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 768, __pyx_L1_error)

    +0769:         cdef str msg = ''

      __Pyx_INCREF(__pyx_kp_s__7);
      __pyx_v_msg = __pyx_kp_s__7;

    +0770:         cdef object fileno = self.fileno()

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_v_fileno = __pyx_t_1;
      __pyx_t_1 = 0;

    +0771:         cdef object activecnt = None

      __Pyx_INCREF(Py_None);
      __pyx_v_activecnt = Py_None;

    +0772:         try:

      {
        /*try:*/ {

        }
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L8_try_end;
        __pyx_L3_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

        __pyx_L5_except_error:;
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
        goto __pyx_L1_error;
        __pyx_L4_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
        __pyx_L8_try_end:;
      }

    +0773:             activecnt = self.activecnt

          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_activecnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF_SET(__pyx_v_activecnt, __pyx_t_1);
          __pyx_t_1 = 0;

    +0774:         except AttributeError:

        __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_8) {
          __Pyx_ErrRestore(0,0,0);
          goto __pyx_L4_exception_handled;
        }
        goto __pyx_L5_except_error;

     0775:             pass

    +0776:         if activecnt is not None:

      __pyx_t_9 = (__pyx_v_activecnt != Py_None);
      if (__pyx_t_9) {

      }

    +0777:             msg += ' ref=' + repr(activecnt)

        __pyx_t_1 = PyObject_Repr(__pyx_v_activecnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PyNumber_Add(__pyx_kp_s_ref_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 777, __pyx_L1_error)
        __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

    +0778:         if fileno is not None:

      __pyx_t_9 = (__pyx_v_fileno != Py_None);
      if (__pyx_t_9) {

      }

    +0779:             msg += ' fileno=' + repr(fileno)

        __pyx_t_1 = PyObject_Repr(__pyx_v_fileno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PyNumber_Add(__pyx_kp_s_fileno_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 779, __pyx_L1_error)
        __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

    +0780:         return msg

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_msg);
      __pyx_r = __pyx_v_msg;
      goto __pyx_L0;

     0781:

    +0782:     def fileno(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_67fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_4loop_67fileno = {"fileno", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_67fileno, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_67fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("fileno (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_66fileno(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_66fileno(struct PyGeventLoopObject *__pyx_v_self) {
      int __pyx_v_fd;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.fileno", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__83 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fd); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__83);
      __Pyx_GIVEREF(__pyx_tuple__83);

      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_4loop_67fileno, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_loop_fileno, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop, __pyx_n_s_fileno, __pyx_t_3) < 0) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_loop);
      __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_fileno, 782, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 782, __pyx_L1_error)

     0783:         cdef int fd

    +0784:         if self._ptr:

      __pyx_t_1 = (__pyx_v_self->_ptr != 0);
      if (__pyx_t_1) {

      }

    +0785:             fd = libev.gevent_ev_loop_backend_fd(self._ptr)

        __pyx_v_fd = gevent_ev_loop_backend_fd(__pyx_v_self->_ptr);

    +0786:             if fd >= 0:

        __pyx_t_1 = (__pyx_v_fd >= 0);
        if (__pyx_t_1) {

        }

    +0787:                 return fd

          __Pyx_XDECREF(__pyx_r);
          __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_r = __pyx_t_2;
          __pyx_t_2 = 0;
          goto __pyx_L0;

     0788:

    +0789:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9activecnt_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9activecnt_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_9activecnt___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9activecnt___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.activecnt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0790:     def activecnt(self):

    +0791:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 791, __pyx_L1_error)

    +0792:         return libev.gevent_ev_loop_activecnt(self._ptr)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_From_int(gevent_ev_loop_activecnt(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0793:

    +0794:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11sig_pending_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11sig_pending_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_11sig_pending___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11sig_pending___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.sig_pending.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0795:     def sig_pending(self):

    +0796:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 796, __pyx_L1_error)

    +0797:         return libev.gevent_ev_loop_sig_pending(self._ptr)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_From_int(gevent_ev_loop_sig_pending(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0798:

    +0799:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9origflags_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9origflags_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_9origflags___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9origflags___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.origflags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0800:     def origflags(self):

    +0801:         return _flags_to_list(self.origflags_int)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_origflags_int); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 801, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0802:

    +0803:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13origflags_int_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13origflags_int_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13origflags_int___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_13origflags_int___get__(struct PyGeventLoopObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.origflags_int.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0804:     def origflags_int(self):

    +0805:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 805, __pyx_L1_error)

    +0806:         return libev.gevent_ev_loop_origflags(self._ptr)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(gevent_ev_loop_origflags(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0807:

    +0808:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5sigfd_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5sigfd_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_5sigfd___get__(((struct PyGeventLoopObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_5sigfd___get__(struct PyGeventLoopObject *__pyx_v_self) {
      int __pyx_v_fd;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.loop.sigfd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0809:     def sigfd(self):

    +0810:         _check_loop(self)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_loop(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 810, __pyx_L1_error)

    +0811:         fd = libev.gevent_ev_loop_sigfd(self._ptr)

      __pyx_v_fd = gevent_ev_loop_sigfd(__pyx_v_self->_ptr);

    +0812:         if fd >= 0:

      __pyx_t_1 = (__pyx_v_fd >= 0);
      if (__pyx_t_1) {

      }

    +0813:             return fd

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

     0814:

     0815:         # Explicitly not EV_USE_SIGNALFD

    +0816:         raise AttributeError("sigfd")

      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 816, __pyx_L1_error)

      __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_sigfd); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 816, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__11);
      __Pyx_GIVEREF(__pyx_tuple__11);

     0817:

     0818:

    +0819: from zope.interface import classImplements

      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_classImplements);
      __Pyx_GIVEREF(__pyx_n_s_classImplements);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_classImplements)) __PYX_ERR(0, 819, __pyx_L1_error);
      __pyx_t_19 = __Pyx_Import(__pyx_n_s_zope_interface, __pyx_t_3, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_19, __pyx_n_s_classImplements); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_classImplements, __pyx_t_3) < 0) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

     0820:

     0821: # XXX: This invokes the side-table lookup, we would

     0822: # prefer to have it stored directly on the class. That means we

     0823: # need a class variable ``__implemented__``, but that's hard in

     0824: # Cython

    +0825: from gevent._interfaces import ILoop

      __pyx_t_19 = PyList_New(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_INCREF(__pyx_n_s_ILoop);
      __Pyx_GIVEREF(__pyx_n_s_ILoop);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 0, __pyx_n_s_ILoop)) __PYX_ERR(0, 825, __pyx_L1_error);
      __pyx_t_3 = __Pyx_Import(__pyx_n_s_gevent__interfaces, __pyx_t_19, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ILoop); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_ILoop, __pyx_t_19) < 0) __PYX_ERR(0, 825, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0826: from gevent._interfaces import ICallback

      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_ICallback);
      __Pyx_GIVEREF(__pyx_n_s_ICallback);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_ICallback)) __PYX_ERR(0, 826, __pyx_L1_error);
      __pyx_t_19 = __Pyx_Import(__pyx_n_s_gevent__interfaces, __pyx_t_3, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_19, __pyx_n_s_ICallback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_ICallback, __pyx_t_3) < 0) __PYX_ERR(0, 826, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    +0827: classImplements(loop, ILoop)

      __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_classImplements); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ILoop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_INCREF((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop);
      __Pyx_GIVEREF((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_loop))) __PYX_ERR(0, 827, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0828: classImplements(callback, ICallback)

      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_classImplements); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_ICallback); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_INCREF((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_callback);
      __Pyx_GIVEREF((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_callback);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 0, ((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_callback))) __PYX_ERR(0, 828, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_18);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_18)) __PYX_ERR(0, 828, __pyx_L1_error);
      __pyx_t_18 = 0;
      __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_19, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

     0829:

     0830:

     0831: cdef extern from *:

     0832:     """

     0833:     #define FLAG_WATCHER_OWNS_PYREF  (1 << 0) /* 0x1 */

     0834:     #define FLAG_WATCHER_NEEDS_EVREF (1 << 1) /* 0x2 */

     0835:     #define FLAG_WATCHER_UNREF_BEFORE_START (1 << 2) /* 0x4 */

     0836:     #define FLAG_WATCHER_MASK_UNREF_NEEDS_REF 0x6

     0837:     """

     0838:     # about readonly _flags attribute:

     0839:     # bit #1 set if object owns Python reference to itself (Py_INCREF was

     0840:     # called and we must call Py_DECREF later)

     0841:     unsigned int FLAG_WATCHER_OWNS_PYREF

     0842:     # bit #2 set if ev_unref() was called and we must call ev_ref() later

     0843:     unsigned int FLAG_WATCHER_NEEDS_EVREF

     0844:     # bit #3 set if user wants to call ev_unref() before start()

     0845:     unsigned int FLAG_WATCHER_UNREF_BEFORE_START

     0846:     # bits 2 and 3 are *both* set when we are active, but the user

     0847:     # request us not to be ref'd anymore. We unref us (because going active will

     0848:     # ref us) and then make a note of this in the future

     0849:     unsigned int FLAG_WATCHER_MASK_UNREF_NEEDS_REF

     0850:

     0851:

    +0852: cdef void _python_incref(watcher self):

    static void __pyx_f_6gevent_5libev_8corecext__python_incref(struct PyGeventWatcherObject *__pyx_v_self) {

      /* function exit code */
    }

    +0853:     if not self._flags & FLAG_WATCHER_OWNS_PYREF:

      __pyx_t_1 = (!((__pyx_v_self->_flags & FLAG_WATCHER_OWNS_PYREF) != 0));
      if (__pyx_t_1) {

      }

    +0854:         Py_INCREF(self)

        Py_INCREF(((PyObject *)__pyx_v_self));

    +0855:         self._flags |= FLAG_WATCHER_OWNS_PYREF

        __pyx_v_self->_flags = (__pyx_v_self->_flags | FLAG_WATCHER_OWNS_PYREF);

     0856:

    +0857: cdef void _python_decref(watcher self):

    static void __pyx_f_6gevent_5libev_8corecext__python_decref(struct PyGeventWatcherObject *__pyx_v_self) {

      /* function exit code */
    }

    +0858:     if self._flags & FLAG_WATCHER_OWNS_PYREF:

      __pyx_t_1 = ((__pyx_v_self->_flags & FLAG_WATCHER_OWNS_PYREF) != 0);
      if (__pyx_t_1) {

      }

    +0859:         Py_DECREF(self)

        Py_DECREF(((PyObject *)__pyx_v_self));

    +0860:         self._flags &= ~FLAG_WATCHER_OWNS_PYREF

        __pyx_v_self->_flags = (__pyx_v_self->_flags & (~FLAG_WATCHER_OWNS_PYREF));

     0861:

    +0862: cdef void _libev_ref(watcher self):

    static void __pyx_f_6gevent_5libev_8corecext__libev_ref(struct PyGeventWatcherObject *__pyx_v_self) {

      /* function exit code */
    }

    +0863:     if self._flags & FLAG_WATCHER_NEEDS_EVREF:

      __pyx_t_1 = ((__pyx_v_self->_flags & FLAG_WATCHER_NEEDS_EVREF) != 0);
      if (__pyx_t_1) {

      }

    +0864:         libev.ev_ref(self.loop._ptr)

        ev_ref(__pyx_v_self->loop->_ptr);

    +0865:         self._flags &= ~FLAG_WATCHER_NEEDS_EVREF

        __pyx_v_self->_flags = (__pyx_v_self->_flags & (~FLAG_WATCHER_NEEDS_EVREF));

     0866:

    +0867: cdef void _libev_unref(watcher self):

    static void __pyx_f_6gevent_5libev_8corecext__libev_unref(struct PyGeventWatcherObject *__pyx_v_self) {

      /* function exit code */
    }

    +0868:     if self._flags & FLAG_WATCHER_MASK_UNREF_NEEDS_REF == FLAG_WATCHER_UNREF_BEFORE_START:

      __pyx_t_1 = ((__pyx_v_self->_flags & FLAG_WATCHER_MASK_UNREF_NEEDS_REF) == FLAG_WATCHER_UNREF_BEFORE_START);
      if (__pyx_t_1) {

      }

    +0869:         libev.ev_unref(self.loop._ptr)

        ev_unref(__pyx_v_self->loop->_ptr);

    +0870:         self._flags |= FLAG_WATCHER_NEEDS_EVREF

        __pyx_v_self->_flags = (__pyx_v_self->_flags | FLAG_WATCHER_NEEDS_EVREF);

     0871:

     0872:

    +0873: ctypedef void (*start_stop_func)(libev.ev_loop*, void*) nogil

    typedef void (*__pyx_t_6gevent_5libev_8corecext_start_stop_func)(struct ev_loop *, void *);

     0874:

    +0875: cdef struct start_and_stop:

    struct __pyx_t_6gevent_5libev_8corecext_start_and_stop {
      __pyx_t_6gevent_5libev_8corecext_start_stop_func start;
      __pyx_t_6gevent_5libev_8corecext_start_stop_func stop;
    };

     0876:     start_stop_func start

     0877:     start_stop_func stop

     0878:

    +0879: cdef start_and_stop make_ss(void* start, void* stop):

    static struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_f_6gevent_5libev_8corecext_make_ss(void *__pyx_v_start, void *__pyx_v_stop) {
      struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_v_result;
      struct __pyx_t_6gevent_5libev_8corecext_start_and_stop __pyx_r;

      /* function exit code */
      __pyx_L0:;
      return __pyx_r;
    }

    +0880:     cdef start_and_stop result = start_and_stop(<start_stop_func>start, <start_stop_func>stop)

      __pyx_t_1.start = ((__pyx_t_6gevent_5libev_8corecext_start_stop_func)__pyx_v_start);
      __pyx_t_1.stop = ((__pyx_t_6gevent_5libev_8corecext_start_stop_func)__pyx_v_stop);
      __pyx_v_result = __pyx_t_1;

    +0881:     return result

      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

     0882:

    +0883: cdef bint _watcher_start(watcher self, object callback, tuple args) except -1:

    static int __pyx_f_6gevent_5libev_8corecext__watcher_start(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
      int __pyx_r;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("gevent.libev.corecext._watcher_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0884:     # This method should be called by subclasses of watcher, if they

     0885:     # override the python-level `start` function: they've already paid

     0886:     # for argument unpacking, and `start` cannot be cpdef since it

     0887:     # uses varargs.

     0888:

     0889:     # We keep this as a function, not a cdef method of watcher.

     0890:     # If it's a cdef method, it could potentially be overridden

     0891:     # by a subclass, which means that the watcher gains a pointer to a

     0892:     # function table (vtable), making each object 8 bytes larger.

     0893:

    +0894:     _check_loop(self.loop)

      __pyx_t_1 = ((PyObject *)__pyx_v_self->loop);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0895:     if callback is None or not callable(callback):

      __pyx_t_3 = (__pyx_v_callback == Py_None);
      if (!__pyx_t_3) {
      } else {
        __pyx_t_2 = __pyx_t_3;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_callback); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 895, __pyx_L1_error)
      __pyx_t_4 = (!__pyx_t_3);
      __pyx_t_2 = __pyx_t_4;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_2)) {

      }

    +0896:         raise TypeError("Expected callable, not %r" % (callback, ))

        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_callback);
        __Pyx_GIVEREF(__pyx_v_callback);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_callback)) __PYX_ERR(0, 896, __pyx_L1_error);
        __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 896, __pyx_L1_error)

    +0897:     self._callback = callback

      __Pyx_INCREF(__pyx_v_callback);
      __Pyx_GIVEREF(__pyx_v_callback);
      __Pyx_GOTREF(__pyx_v_self->_callback);
      __Pyx_DECREF(__pyx_v_self->_callback);
      __pyx_v_self->_callback = __pyx_v_callback;

    +0898:     self.args = args

      __Pyx_INCREF(__pyx_v_args);
      __Pyx_GIVEREF(__pyx_v_args);
      __Pyx_GOTREF(__pyx_v_self->args);
      __Pyx_DECREF(__pyx_v_self->args);
      __pyx_v_self->args = __pyx_v_args;

    +0899:     _libev_unref(self)

      __pyx_f_6gevent_5libev_8corecext__libev_unref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)

    +0900:     _python_incref(self)

      __pyx_f_6gevent_5libev_8corecext__python_incref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error)

    +0901:     self._w_ss.start(self.loop._ptr, self._w_watcher)

      __pyx_v_self->_w_ss->start(__pyx_v_self->loop->_ptr, __pyx_v_self->_w_watcher); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error)

    +0902:     return 1

      __pyx_r = 1;
      goto __pyx_L0;

     0903:

    +0904: cdef public class watcher [object PyGeventWatcherObject, type PyGeventWatcher_Type]:

    struct PyGeventWatcherObject {
      PyObject_HEAD
      struct PyGeventLoopObject *loop;
      PyObject *_callback;
      PyObject *args;
      struct ev_watcher *_w_watcher;
      struct __pyx_t_6gevent_5libev_8corecext_start_and_stop *_w_ss;
      unsigned int _flags;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventWatcher_Type;

     0905:     """Abstract base class for all the watchers"""

     0906:     ## pointer members

    +0907:     cdef public loop loop

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_4loop___get__(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_self->loop);
      __pyx_r = ((PyObject *)__pyx_v_self->loop);
      goto __pyx_L0;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop_2__set__(((struct PyGeventWatcherObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_value) {
      int __pyx_r;
      if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 907, __pyx_L1_error)
      __pyx_t_1 = __pyx_v_value;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->loop);
      __Pyx_DECREF((PyObject *)__pyx_v_self->loop);
      __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4loop_5__del__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop_4__del__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4loop_4__del__(struct PyGeventWatcherObject *__pyx_v_self) {
      int __pyx_r;
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->loop);
      __Pyx_DECREF((PyObject *)__pyx_v_self->loop);
      __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);

      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0908:     cdef object _callback

    +0909:     cdef public tuple args

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_4args_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4args___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_4args___get__(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->args);
      __pyx_r = __pyx_v_self->args;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4args_2__set__(((struct PyGeventWatcherObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4args_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_value) {
      int __pyx_r;
      if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_value))) __PYX_ERR(0, 909, __pyx_L1_error)
      __pyx_t_1 = __pyx_v_value;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->args);
      __Pyx_DECREF(__pyx_v_self->args);
      __pyx_v_self->args = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_4args_5__del__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4args_4__del__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_7watcher_4args_4__del__(struct PyGeventWatcherObject *__pyx_v_self) {
      int __pyx_r;
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->args);
      __Pyx_DECREF(__pyx_v_self->args);
      __pyx_v_self->args = ((PyObject*)Py_None);

      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0910:

     0911:     # By keeping a _w_watcher cached, the size of the io and timer

     0912:     # structs becomes 152 bytes and child is 160 and stat is 512 (when

     0913:     # the start_and_stop is inlined). On 64-bit macOS CPython 2.7. I

     0914:     # hoped that using libev's data pointer and allocating the

     0915:     # watchers directly and not as inline members would result in

     0916:     # overall savings thanks to better padding, but it didn't. And it

     0917:     # added lots of casts, making the code ugly.

     0918:

     0919:     # Table:

     0920:     # gevent ver   | 1.2 | This | +data

     0921:     # Watcher Kind |     |      |

     0922:     # Timer        | 120 | 152  | 160

     0923:     # IO           | 120 | 152  | 160

     0924:     # Child        | 128 | 160  | 168

     0925:     # Stat         | 480 | 512  | 512

     0926:     cdef libev.ev_watcher* _w_watcher

     0927:

     0928:     # By inlining the start_and_stop struct, instead of taking the address

     0929:     # of a static struct or using the watcher's data pointer, we

     0930:     # use an additional pointer of memory and incur an additional pointer copy

     0931:     # on creation.

     0932:     # But we use fewer pointer accesses for start/stop, and they have

     0933:     # better cache locality. (Then again, we're bigger).

     0934:     # Right now we're going for size, so we use the pointer. IO/Timer objects

     0935:     # are then 144 bytes.

     0936:     cdef start_and_stop* _w_ss

     0937:

     0938:     ## Int members

     0939:

     0940:     # Our subclasses will declare the ev_X struct

     0941:     # as an inline member. This is good for locality, but

     0942:     # probably bad for alignment, as it will get tacked on

     0943:     # immediately after our data.

     0944:

     0945:     # But all ev_watchers start with some ints, so maybe we can help that

     0946:     # out by putting our ints here.

    +0947:     cdef readonly unsigned int _flags

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_6_flags_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_6_flags___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_6_flags___get__(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0948:

    +0949:     def __init__(self, loop loop, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      struct PyGeventLoopObject *__pyx_v_loop = 0;
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[3] = {0,0,0};
        values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 949, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_ref = values[1];
        __pyx_v_priority = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 949, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 949, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher___init__(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_7watcher___init__(struct PyGeventWatcherObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0950:         if not self._w_watcher or not self._w_ss.start or not self._w_ss.stop:

      __pyx_t_2 = (!(__pyx_v_self->_w_watcher != 0));
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = (!(__pyx_v_self->_w_ss->start != 0));
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = (!(__pyx_v_self->_w_ss->stop != 0));
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

      }

    +0951:             raise ValueError("Cannot construct a bare watcher")

        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 951, __pyx_L1_error)

      __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_Cannot_construct_a_bare_watcher); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 951, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__12);
      __Pyx_GIVEREF(__pyx_tuple__12);

    +0952:         self.loop = loop

      __Pyx_INCREF((PyObject *)__pyx_v_loop);
      __Pyx_GIVEREF((PyObject *)__pyx_v_loop);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->loop);
      __Pyx_DECREF((PyObject *)__pyx_v_self->loop);
      __pyx_v_self->loop = __pyx_v_loop;

    +0953:         self._flags = 0 if ref else FLAG_WATCHER_UNREF_BEFORE_START

      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 953, __pyx_L1_error)
      if (__pyx_t_1) {
        __pyx_t_4 = 0;
      } else {
        __pyx_t_4 = FLAG_WATCHER_UNREF_BEFORE_START;
      }
      __pyx_v_self->_flags = __pyx_t_4;

    +0954:         if priority is not None:

      __pyx_t_1 = (__pyx_v_priority != Py_None);
      if (__pyx_t_1) {

      }

    +0955:             libev.ev_set_priority(self._w_watcher, priority)

        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 955, __pyx_L1_error)
        ev_set_priority(__pyx_v_self->_w_watcher, __pyx_t_5);

     0956:

    +0957:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_3ref_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_3ref___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_3ref___get__(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0958:     def ref(self):

    +0959:         return False if self._flags & 4 else True

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((__pyx_v_self->_flags & 4) != 0);
      if (__pyx_t_2) {
        __Pyx_INCREF(Py_False);
        __pyx_t_1 = Py_False;
      } else {
        __Pyx_INCREF(Py_True);
        __pyx_t_1 = Py_True;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0960:

    +0961:     @ref.setter

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_3ref_2__set__(((struct PyGeventWatcherObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_7watcher_3ref_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_value) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0962:     def ref(self, object value):

    +0963:         _check_loop(self.loop)

      __pyx_t_1 = ((PyObject *)__pyx_v_self->loop);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 963, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0964:         if value:

      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 964, __pyx_L1_error)
      if (__pyx_t_2) {

        goto __pyx_L3;
      }

     0965:             # self.ref should be true after this.

    +0966:             if self.ref:

        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 966, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_2) {

        }

    +0967:                return  # ref is already True

          __pyx_r = 0;
          goto __pyx_L0;

     0968:

    +0969:             if self._flags & FLAG_WATCHER_NEEDS_EVREF:  # ev_unref was called, undo

        __pyx_t_2 = ((__pyx_v_self->_flags & FLAG_WATCHER_NEEDS_EVREF) != 0);
        if (__pyx_t_2) {

        }

    +0970:                libev.ev_ref(self.loop._ptr)

          ev_ref(__pyx_v_self->loop->_ptr);

     0971: 			# do not want unref, no outstanding unref

    +0972:             self._flags &= ~FLAG_WATCHER_MASK_UNREF_NEEDS_REF

        __pyx_v_self->_flags = (__pyx_v_self->_flags & (~FLAG_WATCHER_MASK_UNREF_NEEDS_REF));

     0973:         else:

     0974: 			# self.ref must be false after this

    +0975:             if not self.ref:

      /*else*/ {
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 975, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_3 = (!__pyx_t_2);
        if (__pyx_t_3) {

        }

    +0976:                return  # ref is already False

          __pyx_r = 0;
          goto __pyx_L0;

    +0977:             self._flags |= FLAG_WATCHER_UNREF_BEFORE_START

        __pyx_v_self->_flags = (__pyx_v_self->_flags | FLAG_WATCHER_UNREF_BEFORE_START);

    +0978:             if not self._flags & FLAG_WATCHER_NEEDS_EVREF and libev.ev_is_active(self._w_watcher):

        __pyx_t_2 = (!((__pyx_v_self->_flags & FLAG_WATCHER_NEEDS_EVREF) != 0));
        if (__pyx_t_2) {
        } else {
          __pyx_t_3 = __pyx_t_2;
          goto __pyx_L8_bool_binop_done;
        }
        __pyx_t_2 = (ev_is_active(__pyx_v_self->_w_watcher) != 0);
        __pyx_t_3 = __pyx_t_2;
        __pyx_L8_bool_binop_done:;
        if (__pyx_t_3) {

        }
      }
      __pyx_L3:;

    +0979:                libev.ev_unref(self.loop._ptr)

          ev_unref(__pyx_v_self->loop->_ptr);

    +0980:                self._flags |= FLAG_WATCHER_NEEDS_EVREF

          __pyx_v_self->_flags = (__pyx_v_self->_flags | FLAG_WATCHER_NEEDS_EVREF);

     0981:

    +0982:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_8callback_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_8callback___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_8callback___get__(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0983:     def callback(self):

    +0984:         return self._callback

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->_callback);
      __pyx_r = __pyx_v_self->_callback;
      goto __pyx_L0;

     0985:

    +0986:     @callback.setter

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_8callback_2__set__(((struct PyGeventWatcherObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_7watcher_8callback_2__set__(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_callback) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0987:     def callback(self, object callback):

    +0988:         if callback is not None and not callable(callback):

      __pyx_t_2 = (__pyx_v_callback != Py_None);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_PyCallable_Check(__pyx_v_callback); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 988, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_2);
      __pyx_t_1 = __pyx_t_3;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

      }

    +0989:            raise TypeError("Expected callable, not %r" % (callback, ))

        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 989, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_callback);
        __Pyx_GIVEREF(__pyx_v_callback);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callback)) __PYX_ERR(0, 989, __pyx_L1_error);
        __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 989, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 989, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 989, __pyx_L1_error)

    +0990:         self._callback = callback

      __Pyx_INCREF(__pyx_v_callback);
      __Pyx_GIVEREF(__pyx_v_callback);
      __Pyx_GOTREF(__pyx_v_self->_callback);
      __Pyx_DECREF(__pyx_v_self->_callback);
      __pyx_v_self->_callback = __pyx_v_callback;

     0991:

    +0992:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_8priority_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_8priority___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_8priority___get__(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0993:     def priority(self):

    +0994:         return libev.ev_priority(self._w_watcher)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_int(ev_priority(__pyx_v_self->_w_watcher)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0995:

    +0996:     @priority.setter

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_7watcher_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
      int __pyx_v_priority;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      assert(__pyx_arg_priority); {
        __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L3_error)
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_8priority_2__set__(((struct PyGeventWatcherObject *)__pyx_v_self), ((int)__pyx_v_priority));
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_7watcher_8priority_2__set__(struct PyGeventWatcherObject *__pyx_v_self, int __pyx_v_priority) {
      struct ev_watcher *__pyx_v_w;
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0997:     def priority(self, int priority):

    +0998:         cdef libev.ev_watcher* w = self._w_watcher

      __pyx_t_1 = __pyx_v_self->_w_watcher;
      __pyx_v_w = __pyx_t_1;

    +0999:         if libev.ev_is_active(w):

      __pyx_t_2 = (ev_is_active(__pyx_v_w) != 0);
      if (unlikely(__pyx_t_2)) {

      }

    +1000:            raise AttributeError("Cannot set priority of an active watcher")

        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1000, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 1000, __pyx_L1_error)

      __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__13);
      __Pyx_GIVEREF(__pyx_tuple__13);

    +1001:         libev.ev_set_priority(w, priority)

      ev_set_priority(__pyx_v_w, __pyx_v_priority);

     1002:

    +1003:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_6active_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_6active___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_6active___get__(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1004:     def active(self):

    +1005:         return True if libev.ev_is_active(self._w_watcher) else False

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (ev_is_active(__pyx_v_self->_w_watcher) != 0);
      if (__pyx_t_2) {
        __Pyx_INCREF(Py_True);
        __pyx_t_1 = Py_True;
      } else {
        __Pyx_INCREF(Py_False);
        __pyx_t_1 = Py_False;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1006:

    +1007:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_7pending_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_7pending___get__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_7pending___get__(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1008:     def pending(self):

    +1009:         return True if libev.ev_is_pending(self._w_watcher) else False

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (ev_is_pending(__pyx_v_self->_w_watcher) != 0);
      if (__pyx_t_2) {
        __Pyx_INCREF(Py_True);
        __pyx_t_1 = Py_True;
      } else {
        __Pyx_INCREF(Py_False);
        __pyx_t_1 = Py_False;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1010:

    +1011:     def start(self, object callback, *args):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_3start(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_3start = {"start", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_7watcher_3start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_3start(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_callback = 0;
      PyObject *__pyx_v_args = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("start (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
      if (unlikely(!__pyx_v_args)) {
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __Pyx_GOTREF(__pyx_v_args);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};
      PyObject* values[1] = {0};
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            default:
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1011, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "start") < 0)) __PYX_ERR(0, 1011, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs < 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        }
        __pyx_v_callback = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1011, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_2start(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_DECREF(__pyx_v_args);
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_2start(struct PyGeventWatcherObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__85 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_args); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1011, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__85);
      __Pyx_GIVEREF(__pyx_tuple__85);

      __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_3start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_watcher_start, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1011, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_n_s_start, __pyx_t_18) < 0) __PYX_ERR(0, 1011, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_watcher);
      __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_start, 1011, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1011, __pyx_L1_error)

    +1012:         _watcher_start(self, callback, args)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__watcher_start(__pyx_v_self, __pyx_v_callback, __pyx_v_args); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1012, __pyx_L1_error)

     1013:

    +1014:     def stop(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_5stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_5stop = {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_5stop, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_5stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("stop (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_4stop(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_4stop(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_5stop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_watcher_stop, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_n_s_stop, __pyx_t_18) < 0) __PYX_ERR(0, 1014, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_watcher);

      __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_stop, 1014, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1014, __pyx_L1_error)

    +1015:         _check_loop(self.loop)

      __pyx_t_1 = ((PyObject *)__pyx_v_self->loop);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1015, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1016:         _libev_ref(self)

      __pyx_f_6gevent_5libev_8corecext__libev_ref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1016, __pyx_L1_error)

     1017:         # The callback cannot possibly fire while we are executing,

     1018:         # so this is safe.

    +1019:         self._callback = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->_callback);
      __Pyx_DECREF(__pyx_v_self->_callback);
      __pyx_v_self->_callback = Py_None;

    +1020:         self.args = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->args);
      __Pyx_DECREF(__pyx_v_self->args);
      __pyx_v_self->args = ((PyObject*)Py_None);

    +1021:         self._w_ss.stop(self.loop._ptr, self._w_watcher)

      __pyx_v_self->_w_ss->stop(__pyx_v_self->loop->_ptr, __pyx_v_self->_w_watcher); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1021, __pyx_L1_error)

    +1022:         _python_decref(self)

      __pyx_f_6gevent_5libev_8corecext__python_decref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error)

     1023:

    +1024:     def feed(self, int revents, object callback, *args):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_7feed(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_7feed = {"feed", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_7watcher_7feed, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_7feed(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      int __pyx_v_revents;
      PyObject *__pyx_v_callback = 0;
      PyObject *__pyx_v_args = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("feed (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs);
      if (unlikely(!__pyx_v_args)) {
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __Pyx_GOTREF(__pyx_v_args);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_revents,&__pyx_n_s_callback,0};
      PyObject* values[2] = {0,0};
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            default:
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_revents)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, 1); __PYX_ERR(0, 1024, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "feed") < 0)) __PYX_ERR(0, 1024, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs < 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
          values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        }
        __pyx_v_revents = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L3_error)
        __pyx_v_callback = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 1024, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_6feed(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_DECREF(__pyx_v_args);
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_6feed(struct PyGeventWatcherObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__88 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_revents, __pyx_n_s_callback, __pyx_n_s_args); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1024, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__88);
      __Pyx_GIVEREF(__pyx_tuple__88);

      __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_7feed, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_watcher_feed, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1024, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_n_s_feed, __pyx_t_18) < 0) __PYX_ERR(0, 1024, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_watcher);
      __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_feed, 1024, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1024, __pyx_L1_error)

    +1025:         _check_loop(self.loop)

      __pyx_t_1 = ((PyObject *)__pyx_v_self->loop);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1025, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1026:         self.callback = callback

      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1026, __pyx_L1_error)

    +1027:         self.args = args

      __Pyx_INCREF(__pyx_v_args);
      __Pyx_GIVEREF(__pyx_v_args);
      __Pyx_GOTREF(__pyx_v_self->args);
      __Pyx_DECREF(__pyx_v_self->args);
      __pyx_v_self->args = __pyx_v_args;

    +1028:         _libev_unref(self)

      __pyx_f_6gevent_5libev_8corecext__libev_unref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1028, __pyx_L1_error)

    +1029:         libev.ev_feed_event(self.loop._ptr, self._w_watcher, revents)

      ev_feed_event(__pyx_v_self->loop->_ptr, __pyx_v_self->_w_watcher, __pyx_v_revents);

    +1030:         _python_incref(self)

      __pyx_f_6gevent_5libev_8corecext__python_incref(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1030, __pyx_L1_error)

     1031:

    +1032:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_9__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_9__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_8__repr__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_8__repr__(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_v_format = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_format);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1033:         if Py_ReprEnter(self) != 0:

      __pyx_t_1 = (Py_ReprEnter(((PyObject *)__pyx_v_self)) != 0);
      if (__pyx_t_1) {

      }

    +1034:             return "<...>"

        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_kp_s__5);
        __pyx_r = __pyx_kp_s__5;
        goto __pyx_L0;

    +1035:         try:

      /*try:*/ {

    +1036:             format = self._format()

        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_v_format = __pyx_t_2;
        __pyx_t_2 = 0;

    +1037:             result = "<%s at 0x%x native=0x%x%s" % (

        __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_at_0x_x_native_0x_x_s, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1037, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_v_result = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

    +1038:                 self.__class__.__name__,

        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1038, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1038, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3)) __PYX_ERR(0, 1038, __pyx_L5_error);
        __Pyx_GIVEREF(__pyx_t_2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L5_error);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4)) __PYX_ERR(0, 1038, __pyx_L5_error);
        __Pyx_INCREF(__pyx_v_format);
        __Pyx_GIVEREF(__pyx_v_format);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_format)) __PYX_ERR(0, 1038, __pyx_L5_error);
        __pyx_t_3 = 0;
        __pyx_t_2 = 0;
        __pyx_t_4 = 0;

    +1039:                 id(self),

        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);

    +1040:                 <unsigned long>self._w_watcher,

        __pyx_t_4 = __Pyx_PyInt_From_unsigned_long(((unsigned long)__pyx_v_self->_w_watcher)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1040, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);

     1041:                 format

     1042:             )

    +1043:             if self.active:

        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_active); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1043, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1043, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_1) {

        }

    +1044:                 result += " active"

          __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s_active_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1044, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4));
          __pyx_t_4 = 0;

    +1045:             if self.pending:

        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pending); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1045, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1045, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_1) {

        }

    +1046:                 result += " pending"

          __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s_pending_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1046, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4));
          __pyx_t_4 = 0;

    +1047:             if self.callback is not None:

        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1047, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = (__pyx_t_4 != Py_None);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_1) {

        }

    +1048:                 result += " callback=%r" % (self.callback, )

          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1048, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1048, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_4);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(0, 1048, __pyx_L5_error);
          __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_callback_r, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1048, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1048, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_6));
          __pyx_t_6 = 0;

    +1049:             if self.args is not None:

        __pyx_t_1 = (__pyx_v_self->args != ((PyObject*)Py_None));
        if (__pyx_t_1) {

        }

    +1050:                 result += " args=%r" % (self.args, )

          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1050, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_v_self->args);
          __Pyx_GIVEREF(__pyx_v_self->args);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->args)) __PYX_ERR(0, 1050, __pyx_L5_error);
          __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_args_r, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1050, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1050, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_6));
          __pyx_t_6 = 0;

    +1051:             return result + ">"

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1051, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L4_return;
      }

     1052:         finally:

    +1053:             Py_ReprLeave(self)

      /*finally:*/ {
        __pyx_L5_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
          {
            Py_ReprLeave(((PyObject *)__pyx_v_self));
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          }
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
          __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
          goto __pyx_L1_error;
        }
        __pyx_L4_return: {
          __pyx_t_15 = __pyx_r;
          __pyx_r = 0;
          Py_ReprLeave(((PyObject *)__pyx_v_self));
          __pyx_r = __pyx_t_15;
          __pyx_t_15 = 0;
          goto __pyx_L0;
        }
      }

     1054:

    +1055:     def _format(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_11_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_11_format = {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_11_format, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_11_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_format (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_10_format(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_10_format(CYTHON_UNUSED struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_11_format, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_watcher__format, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_n_s_format, __pyx_t_18) < 0) __PYX_ERR(0, 1055, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_watcher);

      __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_format, 1055, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 1055, __pyx_L1_error)

    +1056:         return ''

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_kp_s__7);
      __pyx_r = __pyx_kp_s__7;
      goto __pyx_L0;

     1057:

    +1058:     def close(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_13close = {"close", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_13close, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("close (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_12close(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_12close(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_13close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_watcher_close, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1058, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_n_s_close, __pyx_t_18) < 0) __PYX_ERR(0, 1058, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_watcher);

      __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_close, 1058, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1058, __pyx_L1_error)

    +1059:         self.stop()

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1059, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1059, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1060:

    +1061:     def __enter__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_15__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_15__enter__ = {"__enter__", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_15__enter__, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_15__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_14__enter__(((struct PyGeventWatcherObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_14__enter__(struct PyGeventWatcherObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_15__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_watcher___enter, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1061, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_n_s_enter, __pyx_t_18) < 0) __PYX_ERR(0, 1061, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_watcher);

      __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_enter, 1061, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 1061, __pyx_L1_error)

    +1062:         return self

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __pyx_r = ((PyObject *)__pyx_v_self);
      goto __pyx_L0;

     1063:

    +1064:     def __exit__(self, t, v, tb):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_17__exit__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_7watcher_17__exit__ = {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_7watcher_17__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_17__exit__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      CYTHON_UNUSED PyObject *__pyx_v_t = 0;
      CYTHON_UNUSED PyObject *__pyx_v_v = 0;
      CYTHON_UNUSED PyObject *__pyx_v_tb = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,&__pyx_n_s_v,&__pyx_n_s_tb,0};
      PyObject* values[3] = {0,0,0};
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_t)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1064, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_v)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1064, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 1064, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tb)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1064, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 1064, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 1064, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs != 3)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
          values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
          values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        }
        __pyx_v_t = values[0];
        __pyx_v_v = values[1];
        __pyx_v_tb = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1064, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_16__exit__(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_t, __pyx_v_v, __pyx_v_tb);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_16__exit__(struct PyGeventWatcherObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_v, CYTHON_UNUSED PyObject *__pyx_v_tb) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.watcher.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__93 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_v, __pyx_n_s_tb); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 1064, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__93);
      __Pyx_GIVEREF(__pyx_tuple__93);

      __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_7watcher_17__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_watcher___exit, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1064, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher, __pyx_n_s_exit, __pyx_t_18) < 0) __PYX_ERR(0, 1064, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_watcher);
      __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_exit, 1064, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1064, __pyx_L1_error)

    +1065:         self.close()

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1066:         return

      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

     1067:

    +1068: cdef start_and_stop io_ss = make_ss(<void*>libev.ev_io_start, <void*>libev.ev_io_stop)

      __pyx_t_20 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_io_start), ((void *)ev_io_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1068, __pyx_L1_error)
      __pyx_v_6gevent_5libev_8corecext_io_ss = __pyx_t_20;

     1069:

    +1070: cdef public class io(watcher) [object PyGeventIOObject, type PyGeventIO_Type]:

    struct PyGeventIOObject {
      struct PyGeventWatcherObject __pyx_base;
      struct ev_io _watcher;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventIO_Type;

     1071:

     1072:     cdef libev.ev_io _watcher

     1073:

    +1074:     def start(self, object callback, *args, pass_events=False):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_1start(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_2io_1start = {"start", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_2io_1start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_1start(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_callback = 0;
      PyObject *__pyx_v_pass_events = 0;
      PyObject *__pyx_v_args = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("start (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
      if (unlikely(!__pyx_v_args)) {
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __Pyx_GOTREF(__pyx_v_args);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_pass_events,0};
      PyObject* values[2] = {0,0};
        values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            default:
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1074, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
          }
          if (kw_args == 1) {
            const Py_ssize_t index = 1;
            PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
            if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1074, __pyx_L3_error)
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "start") < 0)) __PYX_ERR(0, 1074, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs < 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        }
        __pyx_v_callback = values[0];
        __pyx_v_pass_events = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1074, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
      __Pyx_AddTraceback("gevent.libev.corecext.io.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_start(((struct PyGeventIOObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_pass_events, __pyx_v_args);

      /* function exit code */
      __Pyx_DECREF(__pyx_v_args);
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_start(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_pass_events, PyObject *__pyx_v_args) {
      PyObject *__pyx_r = NULL;
      __Pyx_INCREF(__pyx_v_args);

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.io.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_args);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__95 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_pass_events, __pyx_n_s_args); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 1074, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__95);
      __Pyx_GIVEREF(__pyx_tuple__95);

      __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1074, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_pass_events, Py_False) < 0) __PYX_ERR(0, 1074, __pyx_L1_error)
      __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_2io_1start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_io_start, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1074, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_19, __pyx_t_18);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_io, __pyx_n_s_start, __pyx_t_19) < 0) __PYX_ERR(0, 1074, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_io);
      __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 0, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_start, 1074, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1074, __pyx_L1_error)

    +1075:         if pass_events:

      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_pass_events); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1075, __pyx_L1_error)
      if (__pyx_t_1) {

      }

    +1076:             args = (GEVENT_CORE_EVENTS, ) + args

        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(GEVENT_CORE_EVENTS);
        __Pyx_GIVEREF(GEVENT_CORE_EVENTS);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, GEVENT_CORE_EVENTS)) __PYX_ERR(0, 1076, __pyx_L1_error);
        __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1076, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_3));
        __pyx_t_3 = 0;

    +1077:         _watcher_start(self, callback, args)

      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__watcher_start(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1077, __pyx_L1_error)

     1078:

    +1079:     def __init__(self, loop loop, libev.vfd_socket_t fd, int events, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_2io_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_2io_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      struct PyGeventLoopObject *__pyx_v_loop = 0;
      CYTHON_UNUSED vfd_socket_t __pyx_v_fd;
      CYTHON_UNUSED int __pyx_v_events;
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_fd,&__pyx_n_s_events_2,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[5] = {0,0,0,0,0};
        values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fd)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 1); __PYX_ERR(0, 1079, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_events_2)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 2); __PYX_ERR(0, 1079, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  4:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1079, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_fd = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_fd == ((vfd_socket_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
        __pyx_v_events = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
        __pyx_v_ref = values[3];
        __pyx_v_priority = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 1079, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.io.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1079, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_2__init__(((struct PyGeventIOObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_fd, __pyx_v_events, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_2io_2__init__(struct PyGeventIOObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED vfd_socket_t __pyx_v_fd, CYTHON_UNUSED int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.io.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1080:         watcher.__init__(self, loop, ref, priority)

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop), __pyx_v_ref, __pyx_v_priority};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1081:

    +1082:     def __cinit__(self, loop loop, libev.vfd_socket_t fd, int events, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_2io_5__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_2io_5__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
      vfd_socket_t __pyx_v_fd;
      int __pyx_v_events;
      CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
      CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_fd,&__pyx_n_s_events_2,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[5] = {0,0,0,0,0};
        values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1082, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fd)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1082, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(0, 1082, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_events_2)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1082, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(0, 1082, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1082, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  4:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1082, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1082, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_fd = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_fd == ((vfd_socket_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1082, __pyx_L3_error)
        __pyx_v_events = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1082, __pyx_L3_error)
        __pyx_v_ref = values[3];
        __pyx_v_priority = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 1082, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.io.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1082, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_4__cinit__(((struct PyGeventIOObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_fd, __pyx_v_events, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_2io_4__cinit__(struct PyGeventIOObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, vfd_socket_t __pyx_v_fd, int __pyx_v_events, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
      int __pyx_v_vfd;
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.io.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1083:         if fd < 0:

      __pyx_t_1 = (__pyx_v_fd < 0);
      if (unlikely(__pyx_t_1)) {

      }

    +1084:             raise ValueError('fd must be non-negative: %r' % fd)

        __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_fd_must_be_non_negative_r, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 1084, __pyx_L1_error)

    +1085:         if events & ~(libev.EV__IOFDSET | libev.EV_READ | libev.EV_WRITE):

      __pyx_t_1 = ((__pyx_v_events & (~((EV__IOFDSET | EV_READ) | EV_WRITE))) != 0);
      if (unlikely(__pyx_t_1)) {

      }

    +1086:             raise ValueError('illegal event mask: %r' % events)

        __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_illegal_event_mask_r, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 1086, __pyx_L1_error)

     1087:         # All the vfd_functions are no-ops on POSIX

    +1088:         cdef int vfd = libev.vfd_open(fd)

      __pyx_t_4 = vfd_open(__pyx_v_fd); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1088, __pyx_L1_error)
      __pyx_v_vfd = __pyx_t_4;

    +1089:         libev.ev_io_init(&self._watcher, <void *>gevent_callback_io, vfd, events)

      ev_io_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_io), __pyx_v_vfd, __pyx_v_events);

    +1090:         self._w_watcher = <libev.ev_watcher*>&self._watcher

      __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

    +1091:         self._w_ss = &io_ss

      __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_io_ss);

     1092:

    +1093:     def __dealloc__(self):

    /* Python wrapper */
    static void __pyx_pw_6gevent_5libev_8corecext_2io_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
    static void __pyx_pw_6gevent_5libev_8corecext_2io_7__dealloc__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_pf_6gevent_5libev_8corecext_2io_6__dealloc__(((struct PyGeventIOObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
    }

    static void __pyx_pf_6gevent_5libev_8corecext_2io_6__dealloc__(struct PyGeventIOObject *__pyx_v_self) {

      /* function exit code */
    }

    +1094:         libev.vfd_free(self._watcher.fd)

      vfd_free(__pyx_v_self->_watcher.fd);

     1095:

    +1096:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_2fd_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_2fd_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_2fd___get__(((struct PyGeventIOObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_2fd___get__(struct PyGeventIOObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.io.fd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1097:     def fd(self):

    +1098:         return libev.vfd_get(self._watcher.fd)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyInt_FromSsize_t(vfd_get(__pyx_v_self->_watcher.fd)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1099:

    +1100:     @fd.setter

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_2io_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_2io_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd) {
      long __pyx_v_fd;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      assert(__pyx_arg_fd); {
        __pyx_v_fd = __Pyx_PyInt_As_long(__pyx_arg_fd); if (unlikely((__pyx_v_fd == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1101, __pyx_L3_error)
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.io.fd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_2fd_2__set__(((struct PyGeventIOObject *)__pyx_v_self), ((long)__pyx_v_fd));
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_2io_2fd_2__set__(struct PyGeventIOObject *__pyx_v_self, long __pyx_v_fd) {
      int __pyx_v_vfd;
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.io.fd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1101:     def fd(self, long fd):

    +1102:         if libev.ev_is_active(&self._watcher):

      __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
      if (unlikely(__pyx_t_1)) {

      }

    +1103:             raise AttributeError("'io' watcher attribute 'fd' is read-only while watcher is active")

        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 1103, __pyx_L1_error)

      __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_io_watcher_attribute_fd_is_read); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 1103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__14);
      __Pyx_GIVEREF(__pyx_tuple__14);

    +1104:         cdef int vfd = libev.vfd_open(fd)

      __pyx_t_3 = vfd_open(__pyx_v_fd); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1104, __pyx_L1_error)
      __pyx_v_vfd = __pyx_t_3;

    +1105:         libev.vfd_free(self._watcher.fd)

      vfd_free(__pyx_v_self->_watcher.fd);

    +1106:         libev.ev_io_init(&self._watcher, <void *>gevent_callback_io, vfd, self._watcher.events)

      ev_io_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_io), __pyx_v_vfd, __pyx_v_self->_watcher.events);

     1107:

    +1108:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_6events_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_6events_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_6events___get__(((struct PyGeventIOObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_6events___get__(struct PyGeventIOObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.io.events.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1109:     def events(self):

    +1110:         return self._watcher.events

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_watcher.events); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1111:

    +1112:     @events.setter

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_2io_6events_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_events); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_2io_6events_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_events) {
      int __pyx_v_events;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      assert(__pyx_arg_events); {
        __pyx_v_events = __Pyx_PyInt_As_int(__pyx_arg_events); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L3_error)
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.io.events.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_6events_2__set__(((struct PyGeventIOObject *)__pyx_v_self), ((int)__pyx_v_events));
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_2io_6events_2__set__(struct PyGeventIOObject *__pyx_v_self, int __pyx_v_events) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.io.events.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1113:     def events(self, int events):

    +1114:         if libev.ev_is_active(&self._watcher):

      __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
      if (unlikely(__pyx_t_1)) {

      }

    +1115:             raise AttributeError("'io' watcher attribute 'events' is read-only while watcher is active")

        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1115, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 1115, __pyx_L1_error)

      __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_io_watcher_attribute_events_is); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1115, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__15);
      __Pyx_GIVEREF(__pyx_tuple__15);

    +1116:         libev.ev_io_init(&self._watcher, <void *>gevent_callback_io, self._watcher.fd, events)

      ev_io_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_io), __pyx_v_self->_watcher.fd, __pyx_v_events);

     1117:

    +1118:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_10events_str_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_10events_str_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_10events_str___get__(((struct PyGeventIOObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_10events_str___get__(struct PyGeventIOObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.io.events_str.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1119:     def events_str(self):

    +1120:         return _events_to_str(self._watcher.events)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__events_to_str(__pyx_v_self->_watcher.events, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1121:

    +1122:     def _format(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_2io_9_format = {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_2io_9_format, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_format (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_8_format(((struct PyGeventIOObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_8_format(struct PyGeventIOObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.io._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_2io_9_format, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_io__format, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_io, __pyx_n_s_format, __pyx_t_19) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_io);

      __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_format, 1122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1122, __pyx_L1_error)

    +1123:         return ' fd=%s events=%s' % (self.fd, self.events_str)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_events_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_fd_s_events_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     1124:

    +1125: cdef start_and_stop timer_ss = make_ss(<void*>libev.ev_timer_start, <void*>libev.ev_timer_stop)

      __pyx_t_20 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_timer_start), ((void *)ev_timer_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L1_error)
      __pyx_v_6gevent_5libev_8corecext_timer_ss = __pyx_t_20;

     1126:

    +1127: cdef public class timer(watcher) [object PyGeventTimerObject, type PyGeventTimer_Type]:

    struct PyGeventTimerObject {
      struct PyGeventWatcherObject __pyx_base;
      struct ev_timer _watcher;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventTimer_Type;

     1128:

     1129:     cdef libev.ev_timer _watcher

     1130:

    +1131:     def __cinit__(self, loop loop, double after=0.0, double repeat=0.0, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_5timer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_5timer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
      double __pyx_v_after;
      double __pyx_v_repeat;
      CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
      CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_after,&__pyx_n_s_repeat,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[5] = {0,0,0,0,0};
        values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_after);
              if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_repeat);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  4:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1131, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        if (values[1]) {
          __pyx_v_after = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_after == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error)
        } else {
          __pyx_v_after = ((double)0.0);
        }
        if (values[2]) {
          __pyx_v_repeat = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_repeat == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error)
        } else {
          __pyx_v_repeat = ((double)0.0);
        }
        __pyx_v_ref = values[3];
        __pyx_v_priority = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 1131, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.timer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1131, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer___cinit__(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_after, __pyx_v_repeat, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_5timer___cinit__(struct PyGeventTimerObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, double __pyx_v_after, double __pyx_v_repeat, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.timer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1132:         if repeat < 0.0:

      __pyx_t_1 = (__pyx_v_repeat < 0.0);
      if (unlikely(__pyx_t_1)) {

      }

    +1133:             raise ValueError("repeat must be positive or zero: %r" % repeat)

        __pyx_t_2 = PyFloat_FromDouble(__pyx_v_repeat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_repeat_must_be_positive_or_zero, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1133, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 1133, __pyx_L1_error)

    +1134:         libev.ev_timer_init(&self._watcher, <void *>gevent_callback_timer, after, repeat)

      ev_timer_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_timer), __pyx_v_after, __pyx_v_repeat);

    +1135:         self._w_watcher = <libev.ev_watcher*>&self._watcher

      __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

    +1136:         self._w_ss = &timer_ss

      __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_timer_ss);

     1137:

    +1138:     def __init__(self, loop loop, double after=0.0, double repeat=0.0, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_5timer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_5timer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      struct PyGeventLoopObject *__pyx_v_loop = 0;
      CYTHON_UNUSED double __pyx_v_after;
      CYTHON_UNUSED double __pyx_v_repeat;
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_after,&__pyx_n_s_repeat,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[5] = {0,0,0,0,0};
        values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1138, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_after);
              if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1138, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_repeat);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1138, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1138, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  4:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1138, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1138, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        if (values[1]) {
          __pyx_v_after = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_after == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1138, __pyx_L3_error)
        } else {
          __pyx_v_after = ((double)0.0);
        }
        if (values[2]) {
          __pyx_v_repeat = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_repeat == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1138, __pyx_L3_error)
        } else {
          __pyx_v_repeat = ((double)0.0);
        }
        __pyx_v_ref = values[3];
        __pyx_v_priority = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 1138, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.timer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1138, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_2__init__(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_after, __pyx_v_repeat, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_5timer_2__init__(struct PyGeventTimerObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED double __pyx_v_after, CYTHON_UNUSED double __pyx_v_repeat, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.timer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1139:         watcher.__init__(self, loop, ref, priority)

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop), __pyx_v_ref, __pyx_v_priority};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1140:

    +1141:     def start(self, object callback, *args, update=None):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_5start(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_5timer_5start = {"start", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_5timer_5start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_5start(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_callback = 0;
      PyObject *__pyx_v_update = 0;
      PyObject *__pyx_v_args = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("start (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
      if (unlikely(!__pyx_v_args)) {
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __Pyx_GOTREF(__pyx_v_args);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_update,0};
      PyObject* values[2] = {0,0};
        values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            default:
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1141, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
          }
          if (kw_args == 1) {
            const Py_ssize_t index = 1;
            PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
            if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1141, __pyx_L3_error)
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "start") < 0)) __PYX_ERR(0, 1141, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs < 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        }
        __pyx_v_callback = values[0];
        __pyx_v_update = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1141, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
      __Pyx_AddTraceback("gevent.libev.corecext.timer.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_4start(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_update, __pyx_v_args);

      /* function exit code */
      __Pyx_DECREF(__pyx_v_args);
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_4start(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_update, PyObject *__pyx_v_args) {
      PyObject *__pyx_r = NULL;
      __Pyx_INCREF(__pyx_v_update);

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.timer.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_update);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__98 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_update, __pyx_n_s_args); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 1141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__98);
      __Pyx_GIVEREF(__pyx_tuple__98);

      __pyx_t_19 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_update, Py_None) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
      __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_5timer_5start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_timer_start, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_18, __pyx_t_19);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_timer, __pyx_n_s_start, __pyx_t_18) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_timer);
      __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 0, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_start, 1141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1141, __pyx_L1_error)

    +1142:         update = update if update is not None else self.loop.starting_timer_may_update_loop_time

      __pyx_t_2 = (__pyx_v_update != Py_None);
      if (__pyx_t_2) {
        __Pyx_INCREF(__pyx_v_update);
        __pyx_t_1 = __pyx_v_update;
      } else {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.loop->starting_timer_may_update_loop_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1142, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_update, __pyx_t_1);
      __pyx_t_1 = 0;

    +1143:         if update:

      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1143, __pyx_L1_error)
      if (__pyx_t_2) {

      }

    +1144:             self.loop.update_now()

        ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_base.loop->__pyx_vtab)->update_now(__pyx_v_self->__pyx_base.loop, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1144, __pyx_L1_error)

    +1145:         _watcher_start(self, callback, args)

      __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__watcher_start(((struct PyGeventWatcherObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1145, __pyx_L1_error)

     1146:

    +1147:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_2at_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_2at_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_2at___get__(((struct PyGeventTimerObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_2at___get__(struct PyGeventTimerObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.timer.at.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1148:     def at(self):

    +1149:         return self._watcher.at

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_watcher.at); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1150:

     1151:     # QQQ: add 'after' and 'repeat' properties?

     1152:

    +1153:     def again(self, object callback, *args, update=True):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_7again(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_5timer_7again = {"again", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_5libev_8corecext_5timer_7again, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_7again(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_callback = 0;
      PyObject *__pyx_v_update = 0;
      PyObject *__pyx_v_args = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("again (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
      if (unlikely(!__pyx_v_args)) {
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __Pyx_GOTREF(__pyx_v_args);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_update,0};
      PyObject* values[2] = {0,0};
        values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            default:
            case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
          }
          kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) {
              (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1153, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
          }
          if (kw_args == 1) {
            const Py_ssize_t index = 1;
            PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
            if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1153, __pyx_L3_error)
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "again") < 0)) __PYX_ERR(0, 1153, __pyx_L3_error)
          }
        } else if (unlikely(__pyx_nargs < 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        }
        __pyx_v_callback = values[0];
        __pyx_v_update = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("again", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1153, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
      __Pyx_AddTraceback("gevent.libev.corecext.timer.again", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_6again(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_update, __pyx_v_args);

      /* function exit code */
      __Pyx_DECREF(__pyx_v_args);
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_6again(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_update, PyObject *__pyx_v_args) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.timer.again", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_update, Py_True) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
      __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_5timer_7again, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_timer_again, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_19, __pyx_t_18);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_timer, __pyx_n_s_again, __pyx_t_19) < 0) __PYX_ERR(0, 1153, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_timer);

      __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(2, 0, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_again, 1153, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 1153, __pyx_L1_error)

    +1154:         _check_loop(self.loop)

      __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.loop);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1154, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1155:         self.callback = callback

      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1155, __pyx_L1_error)

    +1156:         self.args = args

      __Pyx_INCREF(__pyx_v_args);
      __Pyx_GIVEREF(__pyx_v_args);
      __Pyx_GOTREF(__pyx_v_self->__pyx_base.args);
      __Pyx_DECREF(__pyx_v_self->__pyx_base.args);
      __pyx_v_self->__pyx_base.args = __pyx_v_args;

    +1157:         _libev_unref(self)

      __pyx_f_6gevent_5libev_8corecext__libev_unref(((struct PyGeventWatcherObject *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1157, __pyx_L1_error)

    +1158:         if update:

      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1158, __pyx_L1_error)
      if (__pyx_t_2) {

      }

    +1159:             libev.ev_now_update(self.loop._ptr)

        ev_now_update(__pyx_v_self->__pyx_base.loop->_ptr);

    +1160:         libev.ev_timer_again(self.loop._ptr, &self._watcher)

      ev_timer_again(__pyx_v_self->__pyx_base.loop->_ptr, (&__pyx_v_self->_watcher));

    +1161:         _python_incref(self)

      __pyx_f_6gevent_5libev_8corecext__python_incref(((struct PyGeventWatcherObject *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1161, __pyx_L1_error)

     1162:

     1163:

     1164:

    +1165: cdef start_and_stop signal_ss = make_ss(<void*>libev.ev_signal_start, <void*>libev.ev_signal_stop)

      __pyx_t_20 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_signal_start), ((void *)ev_signal_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1165, __pyx_L1_error)
      __pyx_v_6gevent_5libev_8corecext_signal_ss = __pyx_t_20;

     1166:

    +1167: cdef public class signal(watcher) [object PyGeventSignalObject, type PyGeventSignal_Type]:

    struct PyGeventSignalObject {
      struct PyGeventWatcherObject __pyx_base;
      struct ev_signal _watcher;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventSignal_Type;

     1168:

     1169:     cdef libev.ev_signal _watcher

     1170:

    +1171:     def __cinit__(self, loop loop, int signalnum, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_6signal_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_6signal_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
      int __pyx_v_signalnum;
      CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
      CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_signalnum,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[4] = {0,0,0,0};
        values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1171, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signalnum)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1171, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, 1); __PYX_ERR(0, 1171, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1171, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1171, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1171, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_signalnum = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_signalnum == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1171, __pyx_L3_error)
        __pyx_v_ref = values[2];
        __pyx_v_priority = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1171, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.signal.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1171, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal___cinit__(((struct PyGeventSignalObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_signalnum, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_6signal___cinit__(struct PyGeventSignalObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_signalnum, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("gevent.libev.corecext.signal.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1172:         if signalnum < 1 or signalnum >= signalmodule.NSIG:

      __pyx_t_2 = (__pyx_v_signalnum < 1);
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_signalnum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_signalmodule); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_NSIG); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1172, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

      }

    +1173:             raise ValueError('illegal signal number: %r' % signalnum)

        __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_signalnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_illegal_signal_number_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 1173, __pyx_L1_error)

     1174:         # still possible to crash on one of libev's asserts:

     1175:         # 1) "libev: ev_signal_start called with illegal signal number"

     1176:         #    EV_NSIG might be different from signal.NSIG on some platforms

     1177:         # 2) "libev: a signal must not be attached to two different loops"

     1178:         #    we probably could check that in LIBEV_EMBED mode, but not in general

    +1179:         libev.ev_signal_init(&self._watcher, <void *>gevent_callback_signal, signalnum)

      ev_signal_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_signal), __pyx_v_signalnum);

    +1180:         self._w_watcher = <libev.ev_watcher*>&self._watcher

      __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

    +1181:         self._w_ss = &signal_ss

      __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_signal_ss);

     1182:

    +1183:     def __init__(self, loop loop, int signalnum, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_6signal_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_6signal_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      struct PyGeventLoopObject *__pyx_v_loop = 0;
      CYTHON_UNUSED int __pyx_v_signalnum;
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_signalnum,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[4] = {0,0,0,0};
        values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signalnum)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); __PYX_ERR(0, 1183, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1183, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_signalnum = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_signalnum == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L3_error)
        __pyx_v_ref = values[2];
        __pyx_v_priority = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1183, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.signal.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1183, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_2__init__(((struct PyGeventSignalObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_signalnum, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_6signal_2__init__(struct PyGeventSignalObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED int __pyx_v_signalnum, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.signal.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1184:         watcher.__init__(self, loop, ref, priority)

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop), __pyx_v_ref, __pyx_v_priority};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1185:

     1186:

     1187:

    +1188: cdef start_and_stop idle_ss = make_ss(<void*>libev.ev_idle_start, <void*>libev.ev_idle_stop)

      __pyx_t_20 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_idle_start), ((void *)ev_idle_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1188, __pyx_L1_error)
      __pyx_v_6gevent_5libev_8corecext_idle_ss = __pyx_t_20;

     1189:

    +1190: cdef public class idle(watcher) [object PyGeventIdleObject, type PyGeventIdle_Type]:

    struct PyGeventIdleObject {
      struct PyGeventWatcherObject __pyx_base;
      struct ev_idle _watcher;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventIdle_Type;

     1191:

     1192:     cdef libev.ev_idle _watcher

     1193:

    +1194:     def __cinit__(self, loop loop, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_4idle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_4idle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
      CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
      CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[3] = {0,0,0};
        values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1194, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1194, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1194, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1194, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_ref = values[1];
        __pyx_v_priority = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1194, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.idle.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1194, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle___cinit__(((struct PyGeventIdleObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_4idle___cinit__(struct PyGeventIdleObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      return __pyx_r;
    }

    +1195:         libev.ev_idle_init(&self._watcher, <void*>gevent_callback_idle)

      ev_idle_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_idle));

    +1196:         self._w_watcher = <libev.ev_watcher*>&self._watcher

      __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

    +1197:         self._w_ss = &idle_ss

      __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_idle_ss);

     1198:

     1199:

     1200:

    +1201: cdef start_and_stop prepare_ss = make_ss(<void*>libev.ev_prepare_start, <void*>libev.ev_prepare_stop)

      __pyx_t_20 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_prepare_start), ((void *)ev_prepare_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1201, __pyx_L1_error)
      __pyx_v_6gevent_5libev_8corecext_prepare_ss = __pyx_t_20;

     1202:

    +1203: cdef public class prepare(watcher) [object PyGeventPrepareObject, type PyGeventPrepare_Type]:

    struct PyGeventPrepareObject {
      struct PyGeventWatcherObject __pyx_base;
      struct ev_prepare _watcher;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventPrepare_Type;

     1204:

     1205:     cdef libev.ev_prepare _watcher

     1206:

    +1207:     def __cinit__(self, loop loop, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_7prepare_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_7prepare_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
      CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
      CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[3] = {0,0,0};
        values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1207, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1207, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1207, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1207, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_ref = values[1];
        __pyx_v_priority = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1207, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.prepare.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1207, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare___cinit__(((struct PyGeventPrepareObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_7prepare___cinit__(struct PyGeventPrepareObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      return __pyx_r;
    }

    +1208:         libev.ev_prepare_init(&self._watcher, <void*>gevent_callback_prepare)

      ev_prepare_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_prepare));

    +1209:         self._w_watcher = <libev.ev_watcher*>&self._watcher

      __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

    +1210:         self._w_ss = &prepare_ss

      __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_prepare_ss);

     1211:

     1212:

     1213:

    +1214: cdef start_and_stop check_ss = make_ss(<void*>libev.ev_check_start, <void*>libev.ev_check_stop)

      __pyx_t_20 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_check_start), ((void *)ev_check_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1214, __pyx_L1_error)
      __pyx_v_6gevent_5libev_8corecext_check_ss = __pyx_t_20;

     1215:

    +1216: cdef public class check(watcher) [object PyGeventCheckObject, type PyGeventCheck_Type]:

    struct PyGeventCheckObject {
      struct PyGeventWatcherObject __pyx_base;
      struct ev_check _watcher;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventCheck_Type;

     1217:

     1218:     cdef libev.ev_check _watcher

     1219:

    +1220:     def __cinit__(self, loop loop, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_5check_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_5check_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
      CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
      CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[3] = {0,0,0};
        values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1220, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1220, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1220, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1220, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_ref = values[1];
        __pyx_v_priority = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1220, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.check.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1220, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check___cinit__(((struct PyGeventCheckObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_5check___cinit__(struct PyGeventCheckObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      return __pyx_r;
    }

    +1221:         libev.ev_check_init(&self._watcher, <void*>gevent_callback_check)

      ev_check_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_check));

    +1222:         self._w_watcher = <libev.ev_watcher*>&self._watcher

      __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

    +1223:         self._w_ss = &check_ss

      __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_check_ss);

     1224:

     1225:

     1226:

    +1227: cdef start_and_stop fork_ss = make_ss(<void*>libev.ev_fork_start, <void*>libev.ev_fork_stop)

      __pyx_t_20 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_fork_start), ((void *)ev_fork_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1227, __pyx_L1_error)
      __pyx_v_6gevent_5libev_8corecext_fork_ss = __pyx_t_20;

     1228:

    +1229: cdef public class fork(watcher) [object PyGeventForkObject, type PyGeventFork_Type]:

    struct PyGeventForkObject {
      struct PyGeventWatcherObject __pyx_base;
      struct ev_fork _watcher;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventFork_Type;

     1230:

     1231:     cdef libev.ev_fork _watcher

     1232:

    +1233:     def __cinit__(self, loop loop, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_4fork_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_4fork_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
      CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
      CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[3] = {0,0,0};
        values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1233, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1233, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1233, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1233, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_ref = values[1];
        __pyx_v_priority = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1233, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.fork.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1233, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork___cinit__(((struct PyGeventForkObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_4fork___cinit__(struct PyGeventForkObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      return __pyx_r;
    }

    +1234:         libev.ev_fork_init(&self._watcher, <void*>gevent_callback_fork)

      ev_fork_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_fork));

    +1235:         self._w_watcher = <libev.ev_watcher*>&self._watcher

      __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

    +1236:         self._w_ss = &fork_ss

      __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_fork_ss);

     1237:

     1238:

    +1239: cdef start_and_stop async_ss = make_ss(<void*>libev.ev_async_start, <void*>libev.ev_async_stop)

      __pyx_t_20 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_async_start), ((void *)ev_async_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1239, __pyx_L1_error)
      __pyx_v_6gevent_5libev_8corecext_async_ss = __pyx_t_20;

     1240:

    +1241: cdef public class async_(watcher) [object PyGeventAsyncObject, type PyGeventAsync_Type]:

    struct PyGeventAsyncObject {
      struct PyGeventWatcherObject __pyx_base;
      struct ev_async _watcher;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventAsync_Type;

     1242:

     1243:     cdef libev.ev_async _watcher

     1244:

    +1245:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__7pending_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6async__7pending___get__(((struct PyGeventAsyncObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_6async__7pending___get__(struct PyGeventAsyncObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1246:     def pending(self):

     1247:         # Note the use of ev_async_pending instead of ev_is_pending

    +1248:         return True if libev.ev_async_pending(&self._watcher) else False

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (ev_async_pending((&__pyx_v_self->_watcher)) != 0);
      if (__pyx_t_2) {
        __Pyx_INCREF(Py_True);
        __pyx_t_1 = Py_True;
      } else {
        __Pyx_INCREF(Py_False);
        __pyx_t_1 = Py_False;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1249:

    +1250:     def __cinit__(self, loop loop, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_6async__1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_6async__1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
      CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
      CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[3] = {0,0,0};
        values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1250, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_ref = values[1];
        __pyx_v_priority = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1250, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.async_.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1250, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6async____cinit__(((struct PyGeventAsyncObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_6async____cinit__(struct PyGeventAsyncObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      return __pyx_r;
    }

    +1251:         libev.ev_async_init(&self._watcher, <void*>gevent_callback_async)

      ev_async_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_async));

    +1252:         self._w_watcher = <libev.ev_watcher*>&self._watcher

      __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

    +1253:         self._w_ss = &async_ss

      __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_async_ss);

     1254:

     1255:

    +1256:     def send(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__3send(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_6async__3send = {"send", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_6async__3send, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__3send(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("send (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6async__2send(((struct PyGeventAsyncObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_6async__2send(struct PyGeventAsyncObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.async_.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_6async__3send, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_async__send, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1256, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_async_, __pyx_n_s_send, __pyx_t_19) < 0) __PYX_ERR(0, 1256, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_async_);

      __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_send, 1256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1256, __pyx_L1_error)

    +1257:         _check_loop(self.loop)

      __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.loop);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__check_loop(((struct PyGeventLoopObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1257, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1258:         libev.ev_async_send(self.loop._ptr, &self._watcher)

      ev_async_send(__pyx_v_self->__pyx_base.loop->_ptr, (&__pyx_v_self->_watcher));

     1259:

    +1260:     def send_ignoring_arg(self, _ignored):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__5send_ignoring_arg(PyObject *__pyx_v_self, PyObject *__pyx_v__ignored); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_6async__5send_ignoring_arg = {"send_ignoring_arg", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_6async__5send_ignoring_arg, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_6async__5send_ignoring_arg(PyObject *__pyx_v_self, PyObject *__pyx_v__ignored) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("send_ignoring_arg (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6async__4send_ignoring_arg(((struct PyGeventAsyncObject *)__pyx_v_self), ((PyObject *)__pyx_v__ignored));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_6async__4send_ignoring_arg(struct PyGeventAsyncObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__ignored) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.async_.send_ignoring_arg", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__102 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ignored); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__102);
      __Pyx_GIVEREF(__pyx_tuple__102);

      __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_6async__5send_ignoring_arg, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_async__send_ignoring_arg, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_async_, __pyx_n_s_send_ignoring_arg, __pyx_t_19) < 0) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_async_);
      __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_send_ignoring_arg, 1260, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 1260, __pyx_L1_error)

    +1261:         return self.send()

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_send); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1261, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1262:

    +1263: async = async_

      if (PyDict_SetItem(__pyx_d, __pyx_n_s_async_2, ((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_async_)) < 0) __PYX_ERR(0, 1263, __pyx_L1_error)

     1264:

    +1265: cdef start_and_stop child_ss = make_ss(<void*>libev.ev_child_start, <void*>libev.ev_child_stop)

      __pyx_t_20 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_child_start), ((void *)ev_child_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error)
      __pyx_v_6gevent_5libev_8corecext_child_ss = __pyx_t_20;

     1266:

    +1267: cdef public class child(watcher) [object PyGeventChildObject, type PyGeventChild_Type]:

    struct PyGeventChildObject {
      struct PyGeventWatcherObject __pyx_base;
      struct ev_child _watcher;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventChild_Type;

     1268:

     1269:     cdef libev.ev_child _watcher

     1270:

    +1271:     def __cinit__(self, loop loop, int pid, bint trace=0, ref=True):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_5child_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_5child_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      struct PyGeventLoopObject *__pyx_v_loop = 0;
      int __pyx_v_pid;
      int __pyx_v_trace;
      CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_pid,&__pyx_n_s_trace,&__pyx_n_s_ref,0};
      PyObject* values[4] = {0,0,0,0};
        values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pid)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, 1); __PYX_ERR(0, 1271, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_trace);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1271, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_pid = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_pid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
        if (values[2]) {
          __pyx_v_trace = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_trace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L3_error)
        } else {
          __pyx_v_trace = ((int)0);
        }
        __pyx_v_ref = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1271, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.child.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1271, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child___cinit__(((struct PyGeventChildObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_pid, __pyx_v_trace, __pyx_v_ref);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_5child___cinit__(struct PyGeventChildObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_pid, int __pyx_v_trace, CYTHON_UNUSED PyObject *__pyx_v_ref) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.child.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1272:         if sys.platform == 'win32':

      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_platform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_win32, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_t_3)) {

      }

    +1273:             raise AttributeError("Child watchers are not supported on Windows")

        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 1273, __pyx_L1_error)

    +1274:         if not loop.default:

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_loop), __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1274, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = (!__pyx_t_3);
      if (unlikely(__pyx_t_4)) {

      }

    +1275:             raise TypeError('child watchers are only available on the default loop')

        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 1275, __pyx_L1_error)

      __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_child_watchers_are_only_availabl); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1275, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__16);
      __Pyx_GIVEREF(__pyx_tuple__16);

    +1276:         libev.gevent_install_sigchld_handler()

      gevent_install_sigchld_handler();

    +1277:         libev.ev_child_init(&self._watcher, <void *>gevent_callback_child, pid, trace)

      ev_child_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_child), __pyx_v_pid, __pyx_v_trace);

    +1278:         self._w_watcher = <libev.ev_watcher*>&self._watcher

      __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

    +1279:         self._w_ss = &child_ss

      __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_child_ss);

     1280:

    +1281:     def __init__(self, loop loop, int pid, bint trace=0, ref=True):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_5child_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_5child_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      struct PyGeventLoopObject *__pyx_v_loop = 0;
      CYTHON_UNUSED int __pyx_v_pid;
      CYTHON_UNUSED int __pyx_v_trace;
      PyObject *__pyx_v_ref = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_pid,&__pyx_n_s_trace,&__pyx_n_s_ref,0};
      PyObject* values[4] = {0,0,0,0};
        values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1281, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pid)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1281, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); __PYX_ERR(0, 1281, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_trace);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1281, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1281, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1281, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_pid = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_pid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1281, __pyx_L3_error)
        if (values[2]) {
          __pyx_v_trace = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_trace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1281, __pyx_L3_error)
        } else {
          __pyx_v_trace = ((int)0);
        }
        __pyx_v_ref = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1281, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.child.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1281, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_2__init__(((struct PyGeventChildObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_pid, __pyx_v_trace, __pyx_v_ref);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_5child_2__init__(struct PyGeventChildObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED int __pyx_v_pid, CYTHON_UNUSED int __pyx_v_trace, PyObject *__pyx_v_ref) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.child.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1282:         watcher.__init__(self, loop, ref, None)

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop), __pyx_v_ref, Py_None};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1283:

     1284:

    +1285:     def _format(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_5_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_5child_5_format = {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5child_5_format, METH_NOARGS, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_5_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_format (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4_format(((struct PyGeventChildObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4_format(struct PyGeventChildObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.child._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_5child_5_format, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_child__format, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_child, __pyx_n_s_format, __pyx_t_19) < 0) __PYX_ERR(0, 1285, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      PyType_Modified(__pyx_ptype_6gevent_5libev_8corecext_child);

      __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_libev_corecext_pyx, __pyx_n_s_format, 1285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 1285, __pyx_L1_error)

    +1286:         return ' pid=%r rstatus=%r' % (self.pid, self.rstatus)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rstatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_pid_r_rstatus_r, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     1287:

    +1288:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_3pid_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_3pid_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_3pid___get__(((struct PyGeventChildObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_3pid___get__(struct PyGeventChildObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.child.pid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1289:     def pid(self):

    +1290:         return self._watcher.pid

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_watcher.pid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1291:

    +1292:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_4rpid_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_4rpid_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4rpid___get__(((struct PyGeventChildObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4rpid___get__(struct PyGeventChildObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.child.rpid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1293:     def rpid(self):

    +1294:         return self._watcher.rpid

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_watcher.rpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1295:

    +1296:     @rpid.setter

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_5child_4rpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_5child_4rpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
      int __pyx_v_value;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      assert(__pyx_arg_value); {
        __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L3_error)
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.child.rpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4rpid_2__set__(((struct PyGeventChildObject *)__pyx_v_self), ((int)__pyx_v_value));
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_5child_4rpid_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_value) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      return __pyx_r;
    }

     1297:     def rpid(self, int value):

    +1298:         self._watcher.rpid = value

      __pyx_v_self->_watcher.rpid = __pyx_v_value;

     1299:

    +1300:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_7rstatus___get__(((struct PyGeventChildObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_7rstatus___get__(struct PyGeventChildObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.child.rstatus.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1301:     def rstatus(self):

    +1302:         return self._watcher.rstatus

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_watcher.rstatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1303:

    +1304:     @rstatus.setter

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
      int __pyx_v_value;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      assert(__pyx_arg_value); {
        __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1305, __pyx_L3_error)
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      __Pyx_AddTraceback("gevent.libev.corecext.child.rstatus.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_7rstatus_2__set__(((struct PyGeventChildObject *)__pyx_v_self), ((int)__pyx_v_value));
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_5child_7rstatus_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_value) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      return __pyx_r;
    }

     1305:     def rstatus(self, int value):

    +1306:         self._watcher.rstatus = value

      __pyx_v_self->_watcher.rstatus = __pyx_v_value;

     1307:

    +1308: cdef start_and_stop stat_ss = make_ss(<void*>libev.ev_stat_start, <void*>libev.ev_stat_stop)

      __pyx_t_20 = __pyx_f_6gevent_5libev_8corecext_make_ss(((void *)ev_stat_start), ((void *)ev_stat_stop)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1308, __pyx_L1_error)
      __pyx_v_6gevent_5libev_8corecext_stat_ss = __pyx_t_20;

     1309:

    +1310: cdef public class stat(watcher) [object PyGeventStatObject, type PyGeventStat_Type]:

    struct PyGeventStatObject {
      struct PyGeventWatcherObject __pyx_base;
      struct ev_stat _watcher;
      PyObject *path;
      PyObject *_paths;
    };

    __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventStat_Type;

     1311:

     1312:     cdef libev.ev_stat _watcher

    +1313:     cdef readonly str path

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4path_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4path_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4path___get__(((struct PyGeventStatObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4path___get__(struct PyGeventStatObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->path);
      __pyx_r = __pyx_v_self->path;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1314:     cdef readonly bytes _paths

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_6_paths_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_6_paths_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_6_paths___get__(((struct PyGeventStatObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_6_paths___get__(struct PyGeventStatObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->_paths);
      __pyx_r = __pyx_v_self->_paths;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1315:

    +1316:     def __cinit__(self, loop loop, str path, float interval=0.0, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_4stat_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_4stat_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop = 0;
      PyObject *__pyx_v_path = 0;
      float __pyx_v_interval;
      CYTHON_UNUSED PyObject *__pyx_v_ref = 0;
      CYTHON_UNUSED PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_path,&__pyx_n_s_interval,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[5] = {0,0,0,0,0};
        values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_path)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 5, 1); __PYX_ERR(0, 1316, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interval);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  4:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1316, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_path = ((PyObject*)values[1]);
        if (values[2]) {
          __pyx_v_interval = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_interval == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L3_error)
        } else {
          __pyx_v_interval = ((float)0.0);
        }
        __pyx_v_ref = values[3];
        __pyx_v_priority = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 1316, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.stat.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1316, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 1316, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat___cinit__(((struct PyGeventStatObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_path, __pyx_v_interval, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_4stat___cinit__(struct PyGeventStatObject *__pyx_v_self, CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_path, float __pyx_v_interval, CYTHON_UNUSED PyObject *__pyx_v_ref, CYTHON_UNUSED PyObject *__pyx_v_priority) {
      PyObject *__pyx_v_paths = 0;
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("gevent.libev.corecext.stat.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_paths);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1317:         self.path = path

      __Pyx_INCREF(__pyx_v_path);
      __Pyx_GIVEREF(__pyx_v_path);
      __Pyx_GOTREF(__pyx_v_self->path);
      __Pyx_DECREF(__pyx_v_self->path);
      __pyx_v_self->path = __pyx_v_path;

     1318:         cdef bytes paths

    +1319:         if isinstance(path, unicode):

      __pyx_t_1 = PyUnicode_Check(__pyx_v_path);
      if (__pyx_t_1) {

        goto __pyx_L3;
      }

     1320:             # the famous Python3 filesystem encoding debacle hits us here. Can we do better?

     1321:             # We must keep a reference to the encoded string so that its bytes don't get freed

     1322:             # and overwritten, leading to strange errors from libev ("no such file or directory")

    +1323:             paths = (<unicode>path).encode(sys.getfilesystemencoding())

        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1323, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 1323, __pyx_L1_error)
        __pyx_v_paths = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

    +1324:             self._paths = paths

        __Pyx_INCREF(__pyx_v_paths);
        __Pyx_GIVEREF(__pyx_v_paths);
        __Pyx_GOTREF(__pyx_v_self->_paths);
        __Pyx_DECREF(__pyx_v_self->_paths);
        __pyx_v_self->_paths = __pyx_v_paths;

     1325:         else:

    +1326:             paths = <bytes>path

      /*else*/ {
        __pyx_t_2 = __pyx_v_path;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_paths = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

    +1327:             self._paths = paths

        __Pyx_INCREF(__pyx_v_paths);
        __Pyx_GIVEREF(__pyx_v_paths);
        __Pyx_GOTREF(__pyx_v_self->_paths);
        __Pyx_DECREF(__pyx_v_self->_paths);
        __pyx_v_self->_paths = __pyx_v_paths;
      }
      __pyx_L3:;

    +1328:         libev.ev_stat_init(&self._watcher, <void *>gevent_callback_stat, <char*>paths, interval)

      if (unlikely(__pyx_v_paths == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
        __PYX_ERR(0, 1328, __pyx_L1_error)
      }
      __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_paths); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 1328, __pyx_L1_error)
      ev_stat_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_stat), ((char *)__pyx_t_8), __pyx_v_interval);

    +1329:         self._w_watcher = <libev.ev_watcher*>&self._watcher

      __pyx_v_self->__pyx_base._w_watcher = ((struct ev_watcher *)(&__pyx_v_self->_watcher));

    +1330:         self._w_ss = &stat_ss

      __pyx_v_self->__pyx_base._w_ss = (&__pyx_v_6gevent_5libev_8corecext_stat_ss);

     1331:

    +1332:     def __init__(self, loop loop, str path, float interval=0.0, ref=True, priority=None):

    /* Python wrapper */
    static int __pyx_pw_6gevent_5libev_8corecext_4stat_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_5libev_8corecext_4stat_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      struct PyGeventLoopObject *__pyx_v_loop = 0;
      CYTHON_UNUSED PyObject *__pyx_v_path = 0;
      CYTHON_UNUSED float __pyx_v_interval;
      PyObject *__pyx_v_ref = 0;
      PyObject *__pyx_v_priority = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_MACROS
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_path,&__pyx_n_s_interval,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
      PyObject* values[5] = {0,0,0,0,0};
        values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
        values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
        if (__pyx_kwds) {
          Py_ssize_t kw_args;
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            CYTHON_FALLTHROUGH;
            case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
          switch (__pyx_nargs) {
            case  0:
            if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1332, __pyx_L3_error)
            else goto __pyx_L5_argtuple_error;
            CYTHON_FALLTHROUGH;
            case  1:
            if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_path)) != 0)) {
              (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
              kw_args--;
            }
            else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1332, __pyx_L3_error)
            else {
              __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); __PYX_ERR(0, 1332, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  2:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_interval);
              if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1332, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  3:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ref);
              if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1332, __pyx_L3_error)
            }
            CYTHON_FALLTHROUGH;
            case  4:
            if (kw_args > 0) {
              PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_priority);
              if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
              else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1332, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            const Py_ssize_t kwd_pos_args = __pyx_nargs;
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1332, __pyx_L3_error)
          }
        } else {
          switch (__pyx_nargs) {
            case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
            CYTHON_FALLTHROUGH;
            case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
            CYTHON_FALLTHROUGH;
            case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
            CYTHON_FALLTHROUGH;
            case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
            values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
        __pyx_v_path = ((PyObject*)values[1]);
        if (values[2]) {
          __pyx_v_interval = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_interval == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1332, __pyx_L3_error)
        } else {
          __pyx_v_interval = ((float)0.0);
        }
        __pyx_v_ref = values[3];
        __pyx_v_priority = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 1332, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_AddTraceback("gevent.libev.corecext.stat.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1332, __pyx_L1_error)
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 1332, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_2__init__(((struct PyGeventStatObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_path, __pyx_v_interval, __pyx_v_ref, __pyx_v_priority);

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = -1;
      __pyx_L0:;
      {
        Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
          __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
        }
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_5libev_8corecext_4stat_2__init__(struct PyGeventStatObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v_path, CYTHON_UNUSED float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
      int __pyx_r;

      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.stat.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1333:         watcher.__init__(self, loop, ref, priority)

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop), __pyx_v_ref, __pyx_v_priority};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1334:

     1335:

    +1336:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4attr_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4attr_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4attr___get__(((struct PyGeventStatObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4attr___get__(struct PyGeventStatObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.stat.attr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1337:     def attr(self):

    +1338:         if not self._watcher.attr.st_nlink:

      __pyx_t_1 = (!(__pyx_v_self->_watcher.attr.st_nlink != 0));
      if (__pyx_t_1) {

      }

    +1339:             return

        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

    +1340:         return _pystat_fromstructstat(&self._watcher.attr)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = _pystat_fromstructstat((&__pyx_v_self->_watcher.attr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     1341:

    +1342:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4prev_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4prev_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4prev___get__(((struct PyGeventStatObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4prev___get__(struct PyGeventStatObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent.libev.corecext.stat.prev.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1343:     def prev(self):

    +1344:         if not self._watcher.prev.st_nlink:

      __pyx_t_1 = (!(__pyx_v_self->_watcher.prev.st_nlink != 0));
      if (__pyx_t_1) {

      }

    +1345:             return

        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

    +1346:         return _pystat_fromstructstat(&self._watcher.prev)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = _pystat_fromstructstat((&__pyx_v_self->_watcher.prev)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     1347:

    +1348:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_8interval_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_8interval_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_8interval___get__(((struct PyGeventStatObject *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_8interval___get__(struct PyGeventStatObject *__pyx_v_self) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.stat.interval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1349:     def interval(self):

    +1350:         return self._watcher.interval

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_watcher.interval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     1351:

     1352:

     1353:

    +1354: cdef object SYSERR_CALLBACK = None

      __Pyx_INCREF(Py_None);
      __Pyx_XGOTREF(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK);
      __Pyx_DECREF_SET(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK, Py_None);
      __Pyx_GIVEREF(Py_None);

     1355:

     1356:

    +1357: cdef void _syserr_cb(char* msg) noexcept with gil:

    static void __pyx_f_6gevent_5libev_8corecext__syserr_cb(char *__pyx_v_msg) {
      PyObject *__pyx_v_print_exc = NULL;
      #ifdef WITH_THREAD
      PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_WriteUnraisable("gevent.libev.corecext._syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_print_exc);
      __Pyx_RefNannyFinishContext();
      #ifdef WITH_THREAD
      __Pyx_PyGILState_Release(__pyx_gilstate_save);
      #endif
    }

    +1358:     try:

      {
        /*try:*/ {

        }
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L8_try_end;
        __pyx_L3_error:;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        __pyx_L5_except_error:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L1_error;
        __pyx_L4_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        __pyx_L8_try_end:;
      }

    +1359:         SYSERR_CALLBACK(msg, errno)

          __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_msg); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1359, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1359, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK);
          __pyx_t_7 = __pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK; __pyx_t_8 = NULL;
          __pyx_t_9 = 0;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
              __pyx_t_9 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_6};
            __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9);
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1359, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +1360:     except:

        /*except:*/ {
          __Pyx_AddTraceback("gevent.libev.corecext._syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 1360, __pyx_L5_except_error)
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_7);
          __Pyx_XGOTREF(__pyx_t_6);

    +1361:         set_syserr_cb(None)

          __pyx_t_5 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(Py_None, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1361, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +1362:         print_exc = getattr(traceback, 'print_exc', None)

          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_traceback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1362, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_8 = __Pyx_GetAttr3(__pyx_t_5, __pyx_n_s_print_exc, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1362, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_print_exc = __pyx_t_8;
          __pyx_t_8 = 0;

    +1363:         if print_exc is not None:

          __pyx_t_10 = (__pyx_v_print_exc != Py_None);
          if (__pyx_t_10) {

          }
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L4_exception_handled;
        }

    +1364:             print_exc()

            __Pyx_INCREF(__pyx_v_print_exc);
            __pyx_t_5 = __pyx_v_print_exc; __pyx_t_11 = NULL;
            __pyx_t_9 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_5))) {
              __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
              if (likely(__pyx_t_11)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                __Pyx_INCREF(__pyx_t_11);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_5, function);
                __pyx_t_9 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
              __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1364, __pyx_L5_except_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

     1365:

     1366:

    +1367: cpdef set_syserr_cb(callback):

    static PyObject *__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb(PyObject *__pyx_self, PyObject *__pyx_v_callback); /*proto*/
    static PyObject *__pyx_f_6gevent_5libev_8corecext_set_syserr_cb(PyObject *__pyx_v_callback, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent.libev.corecext.set_syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb(PyObject *__pyx_self, PyObject *__pyx_v_callback); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_21set_syserr_cb = {"set_syserr_cb", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb(PyObject *__pyx_self, PyObject *__pyx_v_callback) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("set_syserr_cb (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_5libev_8corecext_20set_syserr_cb(__pyx_self, ((PyObject *)__pyx_v_callback));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_5libev_8corecext_20set_syserr_cb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_callback) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(__pyx_v_callback, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.set_syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

      __pyx_tuple__105 = PyTuple_Pack(1, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 1367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple__105);
      __Pyx_GIVEREF(__pyx_tuple__105);

      __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_5libev_8corecext_21set_syserr_cb, 0, __pyx_n_s_set_syserr_cb, NULL, __pyx_n_s_gevent_libev_corecext, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_syserr_cb, __pyx_t_19) < 0) __PYX_ERR(0, 1367, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

     1368:     global SYSERR_CALLBACK

    +1369:     if callback is None:

      __pyx_t_1 = (__pyx_v_callback == Py_None);
      if (__pyx_t_1) {

        goto __pyx_L3;
      }

    +1370:         libev.ev_set_syserr_cb(NULL)

        ev_set_syserr_cb(NULL);

    +1371:         SYSERR_CALLBACK = None

        __Pyx_INCREF(Py_None);
        __Pyx_XGOTREF(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK);
        __Pyx_DECREF_SET(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK, Py_None);
        __Pyx_GIVEREF(Py_None);

    +1372:     elif callable(callback):

      __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_callback); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1372, __pyx_L1_error)
      if (likely(__pyx_t_1)) {

        goto __pyx_L3;
      }

    +1373:         libev.ev_set_syserr_cb(<void*>_syserr_cb)

        ev_set_syserr_cb(((void *)__pyx_f_6gevent_5libev_8corecext__syserr_cb));

    +1374:         SYSERR_CALLBACK = callback

        __Pyx_INCREF(__pyx_v_callback);
        __Pyx_XGOTREF(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK);
        __Pyx_DECREF_SET(__pyx_v_6gevent_5libev_8corecext_SYSERR_CALLBACK, __pyx_v_callback);
        __Pyx_GIVEREF(__pyx_v_callback);

     1375:     else:

    +1376:         raise TypeError('Expected callable or None, got %r' % (callback, ))

      /*else*/ {
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_callback);
        __Pyx_GIVEREF(__pyx_v_callback);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_callback)) __PYX_ERR(0, 1376, __pyx_L1_error);
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_or_None_got_r, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1376, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 1376, __pyx_L1_error)
      }
      __pyx_L3:;

     1377:

    +1378: libev.ev_set_allocator(<void*>gevent_realloc)

      ev_set_allocator(((void *)gevent_realloc));

     1379:

    +1380: LIBEV_EMBED = bool(libev.LIBEV_EMBED)

      __pyx_t_19 = __Pyx_PyInt_From_int(LIBEV_EMBED); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_19); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1380, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBEV_EMBED, __pyx_t_19) < 0) __PYX_ERR(0, 1380, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    +1381: EV_USE_FLOOR = libev.EV_USE_FLOOR

      __pyx_t_19 = __Pyx_PyInt_From_int(EV_USE_FLOOR); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1381, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_FLOOR, __pyx_t_19) < 0) __PYX_ERR(0, 1381, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    +1382: EV_USE_CLOCK_SYSCALL = libev.EV_USE_CLOCK_SYSCALL

      __pyx_t_19 = __Pyx_PyInt_From_int(EV_USE_CLOCK_SYSCALL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1382, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_CLOCK_SYSCALL, __pyx_t_19) < 0) __PYX_ERR(0, 1382, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    +1383: EV_USE_REALTIME = libev.EV_USE_REALTIME

      __pyx_t_19 = __Pyx_PyInt_From_int(EV_USE_REALTIME); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_REALTIME, __pyx_t_19) < 0) __PYX_ERR(0, 1383, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    +1384: EV_USE_MONOTONIC = libev.EV_USE_MONOTONIC

      __pyx_t_19 = __Pyx_PyInt_From_int(EV_USE_MONOTONIC); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_MONOTONIC, __pyx_t_19) < 0) __PYX_ERR(0, 1384, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    +1385: EV_USE_NANOSLEEP = libev.EV_USE_NANOSLEEP

      __pyx_t_19 = __Pyx_PyInt_From_int(EV_USE_NANOSLEEP); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1385, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_NANOSLEEP, __pyx_t_19) < 0) __PYX_ERR(0, 1385, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    +1386: EV_USE_INOTIFY = libev.EV_USE_INOTIFY

      __pyx_t_19 = __Pyx_PyInt_From_int(EV_USE_INOTIFY); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_INOTIFY, __pyx_t_19) < 0) __PYX_ERR(0, 1386, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    +1387: EV_USE_SIGNALFD = libev.EV_USE_SIGNALFD

      __pyx_t_19 = __Pyx_PyInt_From_int(EV_USE_SIGNALFD); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_SIGNALFD, __pyx_t_19) < 0) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    +1388: EV_USE_EVENTFD = libev.EV_USE_EVENTFD

      __pyx_t_19 = __Pyx_PyInt_From_int(EV_USE_EVENTFD); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_EVENTFD, __pyx_t_19) < 0) __PYX_ERR(0, 1388, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

    +1389: EV_USE_4HEAP = libev.EV_USE_4HEAP

      __pyx_t_19 = __Pyx_PyInt_From_int(EV_USE_4HEAP); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_4HEAP, __pyx_t_19) < 0) __PYX_ERR(0, 1389, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

     1390:

     1391: # Things used in callbacks.c

     1392:

    +1393: from traceback import print_exception

      __pyx_t_19 = PyList_New(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_INCREF(__pyx_n_s_print_exception);
      __Pyx_GIVEREF(__pyx_n_s_print_exception);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 0, __pyx_n_s_print_exception)) __PYX_ERR(0, 1393, __pyx_L1_error);
      __pyx_t_18 = __Pyx_Import(__pyx_n_s_traceback, __pyx_t_19, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = __Pyx_ImportFrom(__pyx_t_18, __pyx_n_s_print_exception); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_print_exception, __pyx_t_19) < 0) __PYX_ERR(0, 1393, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

     1394:

    +1395: cdef public void gevent_handle_error(loop loop, object context):

    void gevent_handle_error(struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_context) {
      PyObject *__pyx_v_typep;
      PyObject *__pyx_v_valuep;
      PyObject *__pyx_v_tracebackp;
      PyObject *__pyx_v_type = 0;
      PyObject *__pyx_v_value = 0;
      PyObject *__pyx_v_traceback = 0;

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_AddTraceback("gevent.libev.corecext.gevent_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_type);
      __Pyx_XDECREF(__pyx_v_value);
      __Pyx_XDECREF(__pyx_v_traceback);
      __Pyx_RefNannyFinishContext();
    }

     1396:     cdef PyObject* typep

     1397:     cdef PyObject* valuep

     1398:     cdef PyObject* tracebackp

     1399:

     1400:     cdef object type

    +1401:     cdef object value = None

      __Pyx_INCREF(Py_None);
      __pyx_v_value = Py_None;

    +1402:     cdef object traceback = None

      __Pyx_INCREF(Py_None);
      __pyx_v_traceback = Py_None;

     1403:

     1404:     # If it was set, this will clear it, and we will own

     1405:     # the references.

    +1406:     PyErr_Fetch(&typep, &valuep, &tracebackp)

      PyErr_Fetch((&__pyx_v_typep), (&__pyx_v_valuep), (&__pyx_v_tracebackp));

    +1407:     if not typep:

      __pyx_t_1 = (!(__pyx_v_typep != 0));
      if (__pyx_t_1) {

      }

    +1408:         return

        goto __pyx_L0;

     1409:

    +1410:     PyErr_NormalizeException(&typep, &valuep, &tracebackp)

      PyErr_NormalizeException((&__pyx_v_typep), (&__pyx_v_valuep), (&__pyx_v_tracebackp));

     1411:

     1412:

    +1413:     if tracebackp:

      __pyx_t_1 = (__pyx_v_tracebackp != 0);
      if (__pyx_t_1) {

      }

    +1414:         PyException_SetTraceback(valuep, tracebackp)

        PyException_SetTraceback(__pyx_v_valuep, __pyx_v_tracebackp); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1414, __pyx_L1_error)

     1415:

     1416:     # This assignment will do a Py_INCREF

     1417:     # on the value. We already own the reference

     1418:     # returned from PyErr_Fetch,

     1419:     # so we must decref immediately

    +1420:     type = <object>typep

      __pyx_t_2 = ((PyObject *)__pyx_v_typep);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_type = __pyx_t_2;
      __pyx_t_2 = 0;

    +1421:     Py_DECREF(type)

      Py_DECREF(__pyx_v_type);

     1422:

    +1423:     if valuep:

      __pyx_t_1 = (__pyx_v_valuep != 0);
      if (__pyx_t_1) {

      }

    +1424:         value = <object>valuep

        __pyx_t_2 = ((PyObject *)__pyx_v_valuep);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
        __pyx_t_2 = 0;

    +1425:         Py_DECREF(value)

        Py_DECREF(__pyx_v_value);

    +1426:     if tracebackp:

      __pyx_t_1 = (__pyx_v_tracebackp != 0);
      if (__pyx_t_1) {

      }

    +1427:         traceback = <object>tracebackp

        __pyx_t_2 = ((PyObject *)__pyx_v_tracebackp);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_DECREF_SET(__pyx_v_traceback, __pyx_t_2);
        __pyx_t_2 = 0;

    +1428:         Py_DECREF(traceback)

        Py_DECREF(__pyx_v_traceback);

     1429:

     1430:

     1431:     # Prior to Cython 3.<something>, we relied on Cython printing an

     1432:     # uncaught exception here (because we don't return a Python object, and

     1433:     # we have no except clause). It seems that as-of 3.0b3 at least,

     1434:     # that no longer happens by default; if we want un caught, unraisable exception to be

     1435:     # reported, we need to do so ourself.

    +1436:     try:

      {
        /*try:*/ {

        }
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
        __pyx_L12_try_end:;
      }

    +1437:         loop.handle_error(context, type, value, traceback)

          __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_loop->__pyx_vtab)->handle_error(__pyx_v_loop, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_traceback, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1437, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +1438:     except:

        /*except:*/ {
          __Pyx_AddTraceback("gevent.libev.corecext.gevent_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1438, __pyx_L9_except_error)
          __Pyx_XGOTREF(__pyx_t_2);
          __Pyx_XGOTREF(__pyx_t_6);
          __Pyx_XGOTREF(__pyx_t_7);

     1439:         # In an except: block, PyErr_Occurred() is actually false.

     1440:         # Cython has captured the exception and moved it around. The

     1441:         # exc_info is available at the python level, but

     1442:         # the C level APIs aren't going to work. In debug builds,

     1443:         # PyErr_WriteUnraisable will crash with an assertion.

     1444:         #

     1445:         # It would be nice to call ``sys.unraisablehook``, but the default

     1446:         # implementation of that requires that the argument be of

     1447:         # a specific private type we cannot construct.

    +1448:         print_exception(*sys.exc_info())

          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_print_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1448, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_sys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1448, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1448, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = NULL;
          __pyx_t_12 = 0;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_11, function);
              __pyx_t_12 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
            __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1448, __pyx_L9_except_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
          __pyx_t_11 = __Pyx_PySequence_Tuple(__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1448, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1448, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L8_exception_handled;
        }

     1449:

     1450:

    +1451: cdef public tuple _empty_tuple = ()

      __Pyx_INCREF(__pyx_empty_tuple);
      __Pyx_XGOTREF(_empty_tuple);
      __Pyx_DECREF_SET(_empty_tuple, __pyx_empty_tuple);
      __Pyx_GIVEREF(__pyx_empty_tuple);

     1452:

    +1453: cdef public object gevent_loop_run_callbacks(loop loop):

    PyObject *gevent_loop_run_callbacks(struct PyGeventLoopObject *__pyx_v_loop) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent.libev.corecext.gevent_loop_run_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1454:     return loop._run_callbacks()

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_loop->__pyx_vtab)->_run_callbacks(__pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;