wepoll 0.1.2__cp313-cp313-win32.whl → 0.1.3__cp313-cp313-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
wepoll/_wepoll.c CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated by Cython 3.1.3 */
1
+ /* Generated by Cython 3.1.4 */
2
2
 
3
3
  /* BEGIN: Cython Metadata
4
4
  {
@@ -289,8 +289,8 @@ _PyTime_Add(int64_t t1, int64_t t2)
289
289
  #elif PY_VERSION_HEX < 0x03080000
290
290
  #error Cython requires Python 3.8+.
291
291
  #else
292
- #define __PYX_ABI_VERSION "3_1_3"
293
- #define CYTHON_HEX_VERSION 0x030103F0
292
+ #define __PYX_ABI_VERSION "3_1_4"
293
+ #define CYTHON_HEX_VERSION 0x030104F0
294
294
  #define CYTHON_FUTURE_DIVISION 1
295
295
  /* CModulePreamble */
296
296
  #include <stddef.h>
@@ -1397,7 +1397,6 @@ static CYTHON_INLINE float __PYX_NAN() {
1397
1397
  #include "wepoll.h"
1398
1398
  #include <string.h>
1399
1399
  #include <stdio.h>
1400
- #include <limits.h>
1401
1400
 
1402
1401
  #if PY_VERSION_HEX >= 0x030d00b1 || defined(PyTime_t)
1403
1402
  #define __Pyx_PyTime_t PyTime_t
@@ -1488,6 +1487,11 @@ typedef struct {
1488
1487
 
1489
1488
  PySocketModule_APIObject* __cython_socket_api;
1490
1489
 
1490
+ /* Attempts to make pywepoll threadsafe */
1491
+ PySocketModule_APIObject* cimport_socket(){
1492
+ return (PySocketModule_APIObject*)PyCapsule_Import(PySocket_CAPSULE_NAME, 0);
1493
+ }
1494
+
1491
1495
  int import_socket(){
1492
1496
  /* PySocketModule_ImportModuleAndAPI Macro was not required
1493
1497
  * we need the import to block incase of failure */
@@ -1495,6 +1499,7 @@ int import_socket(){
1495
1499
  return __cython_socket_api != NULL;
1496
1500
  }
1497
1501
 
1502
+
1498
1503
  static inline int SocketType_CheckExact(PyObject* obj) {
1499
1504
  if (__cython_socket_api != NULL){
1500
1505
  return Py_IS_TYPE(obj, __cython_socket_api->Sock_Type);
@@ -1516,6 +1521,7 @@ static inline int Socket_GetFileDescriptor(PyObject* sock, uintptr_t *fd){
1516
1521
  return 0;
1517
1522
  }
1518
1523
 
1524
+ #include <limits.h>
1519
1525
  #include "windows.h"
1520
1526
  #include "handleapi.h"
1521
1527
 
@@ -1921,7 +1927,7 @@ static const char* const __pyx_f[] = {
1921
1927
  struct __pyx_obj_6wepoll_7_wepoll_epoll;
1922
1928
  struct __pyx_opt_args_6wepoll_7_wepoll_5epoll_poll;
1923
1929
 
1924
- /* "wepoll/_wepoll.pxd":23
1930
+ /* "wepoll/_wepoll.pxd":27
1925
1931
  * cpdef object modify(self, object fd, unsigned int eventmask)
1926
1932
  * cpdef object unregister(self, object fd)
1927
1933
  * cpdef list poll(self, object timeout =*, int maxevents =*) # <<<<<<<<<<<<<<
@@ -1934,7 +1940,7 @@ struct __pyx_opt_args_6wepoll_7_wepoll_5epoll_poll {
1934
1940
  int maxevents;
1935
1941
  };
1936
1942
 
1937
- /* "wepoll/_wepoll.pxd":6
1943
+ /* "wepoll/_wepoll.pxd":7
1938
1944
  * # NOTE: Many portions of code can be externally
1939
1945
  * # used in cython hence it's creation & setup
1940
1946
  * cdef class epoll: # <<<<<<<<<<<<<<
@@ -1946,11 +1952,12 @@ struct __pyx_obj_6wepoll_7_wepoll_epoll {
1946
1952
  struct __pyx_vtabstruct_6wepoll_7_wepoll_epoll *__pyx_vtab;
1947
1953
  HANDLE handle;
1948
1954
  int closed;
1955
+ PySocketModule_APIObject *socket_api;
1949
1956
  };
1950
1957
 
1951
1958
 
1952
1959
 
1953
- /* "wepoll/_wepoll.pyx":358
1960
+ /* "wepoll/_wepoll.pyx":355
1954
1961
  *
1955
1962
  * # Keep final the same way select does on linux
1956
1963
  * @cython.final # <<<<<<<<<<<<<<
@@ -1959,6 +1966,7 @@ struct __pyx_obj_6wepoll_7_wepoll_epoll {
1959
1966
  */
1960
1967
 
1961
1968
  struct __pyx_vtabstruct_6wepoll_7_wepoll_epoll {
1969
+ SOCKET (*_fd_from_object)(struct __pyx_obj_6wepoll_7_wepoll_epoll *, PyObject *);
1962
1970
  int (*_create)(struct __pyx_obj_6wepoll_7_wepoll_epoll *, int);
1963
1971
  int (*_create1)(struct __pyx_obj_6wepoll_7_wepoll_epoll *);
1964
1972
  int (*_close)(struct __pyx_obj_6wepoll_7_wepoll_epoll *);
@@ -1975,6 +1983,7 @@ struct __pyx_vtabstruct_6wepoll_7_wepoll_epoll {
1975
1983
  uintptr_t (*fileno)(struct __pyx_obj_6wepoll_7_wepoll_epoll *, int __pyx_skip_dispatch);
1976
1984
  };
1977
1985
  static struct __pyx_vtabstruct_6wepoll_7_wepoll_epoll *__pyx_vtabptr_6wepoll_7_wepoll_epoll;
1986
+ static SOCKET __pyx_f_6wepoll_7_wepoll_5epoll__fd_from_object(struct __pyx_obj_6wepoll_7_wepoll_epoll *, PyObject *);
1978
1987
  static int __pyx_f_6wepoll_7_wepoll_5epoll__create(struct __pyx_obj_6wepoll_7_wepoll_epoll *, int);
1979
1988
  static int __pyx_f_6wepoll_7_wepoll_5epoll__create1(struct __pyx_obj_6wepoll_7_wepoll_epoll *);
1980
1989
  static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wepoll_epoll *);
@@ -2435,22 +2444,22 @@ static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
2435
2444
  static int __Pyx_setup_reduce(PyObject* type_obj);
2436
2445
 
2437
2446
  /* TypeImport.proto */
2438
- #ifndef __PYX_HAVE_RT_ImportType_proto_3_1_3
2439
- #define __PYX_HAVE_RT_ImportType_proto_3_1_3
2447
+ #ifndef __PYX_HAVE_RT_ImportType_proto_3_1_4
2448
+ #define __PYX_HAVE_RT_ImportType_proto_3_1_4
2440
2449
  #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
2441
2450
  #include <stdalign.h>
2442
2451
  #endif
2443
2452
  #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
2444
- #define __PYX_GET_STRUCT_ALIGNMENT_3_1_3(s) alignof(s)
2453
+ #define __PYX_GET_STRUCT_ALIGNMENT_3_1_4(s) alignof(s)
2445
2454
  #else
2446
- #define __PYX_GET_STRUCT_ALIGNMENT_3_1_3(s) sizeof(void*)
2455
+ #define __PYX_GET_STRUCT_ALIGNMENT_3_1_4(s) sizeof(void*)
2447
2456
  #endif
2448
- enum __Pyx_ImportType_CheckSize_3_1_3 {
2449
- __Pyx_ImportType_CheckSize_Error_3_1_3 = 0,
2450
- __Pyx_ImportType_CheckSize_Warn_3_1_3 = 1,
2451
- __Pyx_ImportType_CheckSize_Ignore_3_1_3 = 2
2457
+ enum __Pyx_ImportType_CheckSize_3_1_4 {
2458
+ __Pyx_ImportType_CheckSize_Error_3_1_4 = 0,
2459
+ __Pyx_ImportType_CheckSize_Warn_3_1_4 = 1,
2460
+ __Pyx_ImportType_CheckSize_Ignore_3_1_4 = 2
2452
2461
  };
2453
- static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_3 check_size);
2462
+ static PyTypeObject *__Pyx_ImportType_3_1_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_4 check_size);
2454
2463
  #endif
2455
2464
 
2456
2465
  /* FetchSharedCythonModule.proto */
@@ -2809,6 +2818,7 @@ static int __Pyx_State_RemoveModule(void*);
2809
2818
  static CYTHON_INLINE int const __pyx_f_6wepoll_6socket_6socket_6family_family(PySocketSockObject *__pyx_v_self); /* proto*/
2810
2819
  static CYTHON_INLINE int const __pyx_f_6wepoll_6socket_6socket_4type_type(PySocketSockObject *__pyx_v_self); /* proto*/
2811
2820
  static CYTHON_INLINE __Pyx_PyTime_t __pyx_f_6wepoll_6socket_6socket_7timeout_timeout(PySocketSockObject *__pyx_v_self); /* proto*/
2821
+ static SOCKET __pyx_f_6wepoll_7_wepoll_5epoll__fd_from_object(struct __pyx_obj_6wepoll_7_wepoll_epoll *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2812
2822
  static int __pyx_f_6wepoll_7_wepoll_5epoll__create(struct __pyx_obj_6wepoll_7_wepoll_epoll *__pyx_v_self, int __pyx_v_sizehint); /* proto*/
2813
2823
  static int __pyx_f_6wepoll_7_wepoll_5epoll__create1(struct __pyx_obj_6wepoll_7_wepoll_epoll *__pyx_v_self); /* proto*/
2814
2824
  static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wepoll_epoll *__pyx_v_self); /* proto*/
@@ -2828,8 +2838,6 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
2828
2838
 
2829
2839
  /* Module declarations from "wepoll.wepoll" */
2830
2840
 
2831
- /* Module declarations from "cython" */
2832
-
2833
2841
  /* Module declarations from "libc.string" */
2834
2842
 
2835
2843
  /* Module declarations from "libc.stdio" */
@@ -2844,12 +2852,6 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
2844
2852
 
2845
2853
  /* Module declarations from "cpython.exc" */
2846
2854
 
2847
- /* Module declarations from "cpython.long" */
2848
-
2849
- /* Module declarations from "cpython.mem" */
2850
-
2851
- /* Module declarations from "libc.limits" */
2852
-
2853
2855
  /* Module declarations from "libc.stddef" */
2854
2856
 
2855
2857
  /* Module declarations from "libc.time" */
@@ -2863,13 +2865,20 @@ static CYTHON_INLINE int __pyx_f_7cpython_4time__raise_from_errno(void); /*proto
2863
2865
 
2864
2866
  /* Module declarations from "wepoll.socket" */
2865
2867
 
2868
+ /* Module declarations from "cython" */
2869
+
2870
+ /* Module declarations from "cpython.long" */
2871
+
2872
+ /* Module declarations from "cpython.mem" */
2873
+
2874
+ /* Module declarations from "libc.limits" */
2875
+
2866
2876
  /* Module declarations from "wepoll._wepoll" */
2867
2877
  static PyTime_round_t __pyx_v_6wepoll_7_wepoll_PyTime_ROUND_TIMEOUT;
2868
2878
  static PyTime_round_t __pyx_v_6wepoll_7_wepoll_PyTime_ROUND_FLOOR;
2869
2879
  static PyTime_round_t __pyx_v_6wepoll_7_wepoll_PyTime_ROUND_UP;
2870
2880
  static PyTime_round_t __pyx_v_6wepoll_7_wepoll_PyTime_ROUND_CEILING;
2871
2881
  static PyTime_round_t __pyx_v_6wepoll_7_wepoll_PyTime_ROUND_HALF_EVEN;
2872
- static SOCKET __pyx_f_6wepoll_7_wepoll_fd_from_object(PyObject *); /*proto*/
2873
2882
  /* #### Code section: typeinfo ### */
2874
2883
  /* #### Code section: before_global_var ### */
2875
2884
  #define __Pyx_MODULE_NAME "wepoll._wepoll"
@@ -2916,6 +2925,7 @@ static const char __pyx_k_module[] = "__module__";
2916
2925
  static const char __pyx_k_reduce[] = "__reduce__";
2917
2926
  static const char __pyx_k_OSError[] = "OSError";
2918
2927
  static const char __pyx_k_disable[] = "disable";
2928
+ static const char __pyx_k_sock_fd[] = "sock_fd";
2919
2929
  static const char __pyx_k_timeout[] = "timeout";
2920
2930
  static const char __pyx_k_getstate[] = "__getstate__";
2921
2931
  static const char __pyx_k_qualname[] = "__qualname__";
@@ -2955,20 +2965,20 @@ static const char __pyx_k_wepoll__wepoll[] = "wepoll._wepoll";
2955
2965
  static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2956
2966
  static const char __pyx_k_A_XQa_4v_6auBa_q[] = "\200A\340\010\032\230#\230X\240Q\240a\330\010\013\2104\210v\220\\\240\025\320&6\260a\260u\270B\270a\330\014\r\330\010\017\210q";
2957
2967
  static const char __pyx_k_epoll_unregister[] = "epoll.unregister";
2958
- static const char __pyx_k_A_4_S_nAQ_4uA_E_b[] = "\200A\360$\000\t\014\2104\210~\230S\240\002\240!\330\014\r\340\010\016\210n\230A\230Q\330\010\013\2104\210u\220A\220_\240E\250\021\250$\250b\260\001\330\014\r";
2968
+ static const char __pyx_k_A_4_S_d_1_4uA_E_b[] = "\200A\360$\000\t\014\2104\210~\230S\240\002\240!\330\014\r\340\010\016\210d\320\022\"\240!\2401\330\010\013\2104\210u\220A\220_\240E\250\021\250$\250b\260\001\330\014\r";
2959
2969
  static const char __pyx_k_negative_sizehint[] = "negative sizehint";
2960
2970
  static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
2961
2971
  static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2962
2972
  static const char __pyx_k_wepoll__wepoll_pyx[] = "wepoll/_wepoll.pyx";
2963
2973
  static const char __pyx_k_timeout_is_too_large[] = "timeout is too large";
2964
2974
  static const char __pyx_k_epoll___reduce_cython[] = "epoll.__reduce_cython__";
2965
- static const char __pyx_k_A_4_S_nAQ_A_xq_4uA_E_b[] = "\200A\360\010\000\t\014\2104\210~\230S\240\002\240!\330\014\r\340\010\016\210n\230A\230Q\330\010\n\210*\220A\330\010\n\210%\210x\220q\330\010\013\2104\210u\220A\220_\240E\250\021\250$\250b\260\001\330\014\r";
2975
+ static const char __pyx_k_A_4_S_d_1_A_xq_4uA_E_b[] = "\200A\360\010\000\t\014\2104\210~\230S\240\002\240!\330\014\r\340\010\016\210d\320\022\"\240!\2401\330\010\n\210*\220A\330\010\n\210%\210x\220q\330\010\013\2104\210u\220A\220_\240E\250\021\250$\250b\260\001\330\014\r";
2966
2976
  static const char __pyx_k_epoll___setstate_cython[] = "epoll.__setstate_cython__";
2967
- static const char __pyx_k_A_4_S_nAQ_A_xq_4uA_E_b_2[] = "\200A\360&\000\t\014\2104\210~\230S\240\002\240!\330\014\r\330\010\016\210n\230A\230Q\330\010\n\210*\220A\330\010\n\210%\210x\220q\330\010\013\2104\210u\220A\220_\240E\250\021\250$\250b\260\001\330\014\r";
2977
+ static const char __pyx_k_A_4_S_d_1_A_xq_4uA_E_b_2[] = "\200A\360&\000\t\014\2104\210~\230S\240\002\240!\330\014\r\330\010\016\210d\320\022\"\240!\2401\330\010\n\210*\220A\330\010\n\210%\210x\220q\330\010\013\2104\210u\220A\220_\240E\250\021\250$\250b\260\001\330\014\r";
2968
2978
  static const char __pyx_k_B_D_q_q_87_q_9_RRTTU_iq_a_q_s_H[] = "\320\004+\320+B\300!\360\"\000\t!\240\001\360\006\000\t\035\230D\240\001\340\010\023\220<\230q\330\010\017\210q\330\010\013\2108\2207\230!\330\014\017\320\017'\240q\250\001\250\032\2609\320<R\320RT\320TU\330\020\026\220i\230q\240\002\240$\240a\360\n\000\r\022\320\021'\240q\250\n\260!\330\014\017\210s\220\"\220H\230C\230s\240\"\240A\330\020\026\220m\2401\240A\330\014\017\210s\220\"\220A\330\020\026\220a\340\014\017\210y\230\003\2301\330\020\033\230:\240Q\240l\260$\260a\360\006\000\t\014\210:\220T\230\021\330\014#\2401\330\r\027\220r\230\021\330\014\022\220*\230A\230R\320\037I\310\021\340\010\016\210n\230L\250\001\320)=\270R\270q\330\010\013\2104\210s\220!\330\014\r\340\010\t\330\021\022\330\020\030\230\001\330\020\027\220z\240\021\240(\250%\250{\270%\270q\340\014\017\210u\220B\220a\330\020\021\340\014\017\210u\220B\220a\330\020\032\230!\2301\330\020\"\240!\2401\330\020\021\360\006\000\r\020\320\017!\240\023\240B\240a\330\020\032\230!\2301\330\020\021\340\014\017\210x\220s\230!\330\020\032\230)\2402\240\\\260\021\330\020\024\220H\230B\230a\330\024\033\2301\330\024\025\330\020\025\320\025+\2501\250I\260Q\340\010\020\220\002\220#\220Q\220b\230\005\230U\240#\240Q\240b\250\t\260\024\260U\270%\270q\300\001\330\010\022\220!\2201\330\010\017\210q";
2969
- static const char __pyx_k_self_handle_cannot_be_converted[] = "self.handle cannot be converted to a Python object for pickling";
2970
2979
  static const char __pyx_k_I_O_operation_on_closed_epoll_ob[] = "I/O operation on closed epoll object";
2971
2980
  static const char __pyx_k_maxevents_must_be_greater_than_0[] = "maxevents must be greater than 0, got ";
2981
+ static const char __pyx_k_self_handle_self_socket_api_cann[] = "self.handle,self.socket_api cannot be converted to a Python object for pickling";
2972
2982
  /* #### Code section: decls ### */
2973
2983
  static int __pyx_pf_6wepoll_7_wepoll_5epoll___init__(struct __pyx_obj_6wepoll_7_wepoll_epoll *__pyx_v_self, int __pyx_v_sizehint); /* proto */
2974
2984
  static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_2fileno(struct __pyx_obj_6wepoll_7_wepoll_epoll *__pyx_v_self); /* proto */
@@ -3030,7 +3040,7 @@ typedef struct {
3030
3040
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
3031
3041
  PyObject *__pyx_tuple[1];
3032
3042
  PyObject *__pyx_codeobj_tab[11];
3033
- PyObject *__pyx_string_tab[73];
3043
+ PyObject *__pyx_string_tab[74];
3034
3044
  PyObject *__pyx_int_0;
3035
3045
  PyObject *__pyx_int_neg_1;
3036
3046
  /* #### Code section: module_state_contents ### */
@@ -3128,21 +3138,22 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati
3128
3138
  #define __pyx_n_u_reduce_ex __pyx_string_tab[55]
3129
3139
  #define __pyx_n_u_register __pyx_string_tab[56]
3130
3140
  #define __pyx_n_u_self __pyx_string_tab[57]
3131
- #define __pyx_kp_u_self_handle_cannot_be_converted __pyx_string_tab[58]
3141
+ #define __pyx_kp_u_self_handle_self_socket_api_cann __pyx_string_tab[58]
3132
3142
  #define __pyx_n_u_set_name __pyx_string_tab[59]
3133
3143
  #define __pyx_n_u_setstate __pyx_string_tab[60]
3134
3144
  #define __pyx_n_u_setstate_cython __pyx_string_tab[61]
3135
3145
  #define __pyx_n_u_sizehint __pyx_string_tab[62]
3136
3146
  #define __pyx_n_u_sock_family __pyx_string_tab[63]
3137
- #define __pyx_n_u_sock_timeout __pyx_string_tab[64]
3138
- #define __pyx_n_u_sock_type __pyx_string_tab[65]
3139
- #define __pyx_kp_u_stringsource __pyx_string_tab[66]
3140
- #define __pyx_n_u_test __pyx_string_tab[67]
3141
- #define __pyx_n_u_timeout __pyx_string_tab[68]
3142
- #define __pyx_kp_u_timeout_is_too_large __pyx_string_tab[69]
3143
- #define __pyx_n_u_unregister __pyx_string_tab[70]
3144
- #define __pyx_n_u_wepoll__wepoll __pyx_string_tab[71]
3145
- #define __pyx_kp_u_wepoll__wepoll_pyx __pyx_string_tab[72]
3147
+ #define __pyx_n_u_sock_fd __pyx_string_tab[64]
3148
+ #define __pyx_n_u_sock_timeout __pyx_string_tab[65]
3149
+ #define __pyx_n_u_sock_type __pyx_string_tab[66]
3150
+ #define __pyx_kp_u_stringsource __pyx_string_tab[67]
3151
+ #define __pyx_n_u_test __pyx_string_tab[68]
3152
+ #define __pyx_n_u_timeout __pyx_string_tab[69]
3153
+ #define __pyx_kp_u_timeout_is_too_large __pyx_string_tab[70]
3154
+ #define __pyx_n_u_unregister __pyx_string_tab[71]
3155
+ #define __pyx_n_u_wepoll__wepoll __pyx_string_tab[72]
3156
+ #define __pyx_kp_u_wepoll__wepoll_pyx __pyx_string_tab[73]
3146
3157
  /* #### Code section: module_state_clear ### */
3147
3158
  #if CYTHON_USE_MODULE_STATE
3148
3159
  static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
@@ -3169,7 +3180,7 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
3169
3180
  Py_CLEAR(clear_module_state->__pyx_type_6wepoll_7_wepoll_epoll);
3170
3181
  for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
3171
3182
  for (int i=0; i<11; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
3172
- for (int i=0; i<73; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
3183
+ for (int i=0; i<74; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
3173
3184
  Py_CLEAR(clear_module_state->__pyx_int_0);
3174
3185
  Py_CLEAR(clear_module_state->__pyx_int_neg_1);
3175
3186
  return 0;
@@ -3198,7 +3209,7 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void
3198
3209
  Py_VISIT(traverse_module_state->__pyx_type_6wepoll_7_wepoll_epoll);
3199
3210
  for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
3200
3211
  for (int i=0; i<11; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
3201
- for (int i=0; i<73; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
3212
+ for (int i=0; i<74; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
3202
3213
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0);
3203
3214
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_neg_1);
3204
3215
  return 0;
@@ -3618,7 +3629,7 @@ static CYTHON_INLINE struct tm __pyx_f_7cpython_4time_localtime(void) {
3618
3629
  return __pyx_r;
3619
3630
  }
3620
3631
 
3621
- /* "socket.pxd":110
3632
+ /* "socket.pxd":118
3622
3633
  * # with sockets from python's end.
3623
3634
  *
3624
3635
  * @property # <<<<<<<<<<<<<<
@@ -3636,21 +3647,21 @@ static CYTHON_INLINE int const __pyx_f_6wepoll_6socket_6socket_6family_family(Py
3636
3647
  int __pyx_clineno = 0;
3637
3648
  __Pyx_RefNannySetupContext("family", 0);
3638
3649
 
3639
- /* "socket.pxd":112
3650
+ /* "socket.pxd":120
3640
3651
  * @property
3641
3652
  * cdef inline const int family(self):
3642
3653
  * return self.sock_family # <<<<<<<<<<<<<<
3643
3654
  *
3644
3655
  * @property
3645
3656
  */
3646
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_sock_family); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 112, __pyx_L1_error)
3657
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_sock_family); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 120, __pyx_L1_error)
3647
3658
  __Pyx_GOTREF(__pyx_t_1);
3648
- __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 112, __pyx_L1_error)
3659
+ __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 120, __pyx_L1_error)
3649
3660
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3650
3661
  __pyx_r = __pyx_t_2;
3651
3662
  goto __pyx_L0;
3652
3663
 
3653
- /* "socket.pxd":110
3664
+ /* "socket.pxd":118
3654
3665
  * # with sockets from python's end.
3655
3666
  *
3656
3667
  * @property # <<<<<<<<<<<<<<
@@ -3668,7 +3679,7 @@ static CYTHON_INLINE int const __pyx_f_6wepoll_6socket_6socket_6family_family(Py
3668
3679
  return __pyx_r;
3669
3680
  }
3670
3681
 
3671
- /* "socket.pxd":114
3682
+ /* "socket.pxd":122
3672
3683
  * return self.sock_family
3673
3684
  *
3674
3685
  * @property # <<<<<<<<<<<<<<
@@ -3686,21 +3697,21 @@ static CYTHON_INLINE int const __pyx_f_6wepoll_6socket_6socket_4type_type(PySock
3686
3697
  int __pyx_clineno = 0;
3687
3698
  __Pyx_RefNannySetupContext("type", 0);
3688
3699
 
3689
- /* "socket.pxd":116
3700
+ /* "socket.pxd":124
3690
3701
  * @property
3691
3702
  * cdef inline const int type(self):
3692
3703
  * return self.sock_type # <<<<<<<<<<<<<<
3693
3704
  *
3694
3705
  * @property
3695
3706
  */
3696
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_sock_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 116, __pyx_L1_error)
3707
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_sock_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 124, __pyx_L1_error)
3697
3708
  __Pyx_GOTREF(__pyx_t_1);
3698
- __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 116, __pyx_L1_error)
3709
+ __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 124, __pyx_L1_error)
3699
3710
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3700
3711
  __pyx_r = __pyx_t_2;
3701
3712
  goto __pyx_L0;
3702
3713
 
3703
- /* "socket.pxd":114
3714
+ /* "socket.pxd":122
3704
3715
  * return self.sock_family
3705
3716
  *
3706
3717
  * @property # <<<<<<<<<<<<<<
@@ -3718,7 +3729,7 @@ static CYTHON_INLINE int const __pyx_f_6wepoll_6socket_6socket_4type_type(PySock
3718
3729
  return __pyx_r;
3719
3730
  }
3720
3731
 
3721
- /* "socket.pxd":118
3732
+ /* "socket.pxd":126
3722
3733
  * return self.sock_type
3723
3734
  *
3724
3735
  * @property # <<<<<<<<<<<<<<
@@ -3736,21 +3747,21 @@ static CYTHON_INLINE __Pyx_PyTime_t __pyx_f_6wepoll_6socket_6socket_7timeout_tim
3736
3747
  int __pyx_clineno = 0;
3737
3748
  __Pyx_RefNannySetupContext("timeout", 0);
3738
3749
 
3739
- /* "socket.pxd":120
3750
+ /* "socket.pxd":128
3740
3751
  * @property
3741
3752
  * cdef inline PyTime_t timeout(self):
3742
3753
  * return self.sock_timeout # <<<<<<<<<<<<<<
3743
3754
  *
3744
3755
  * int import_socket() except 0
3745
3756
  */
3746
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_sock_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 120, __pyx_L1_error)
3757
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_sock_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 128, __pyx_L1_error)
3747
3758
  __Pyx_GOTREF(__pyx_t_1);
3748
- __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((__Pyx_PyTime_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 120, __pyx_L1_error)
3759
+ __pyx_t_2 = __Pyx_PyLong_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((__Pyx_PyTime_t)-1)) && PyErr_Occurred())) __PYX_ERR(2, 128, __pyx_L1_error)
3749
3760
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3750
3761
  __pyx_r = __pyx_t_2;
3751
3762
  goto __pyx_L0;
3752
3763
 
3753
- /* "socket.pxd":118
3764
+ /* "socket.pxd":126
3754
3765
  * return self.sock_type
3755
3766
  *
3756
3767
  * @property # <<<<<<<<<<<<<<
@@ -3768,164 +3779,136 @@ static CYTHON_INLINE __Pyx_PyTime_t __pyx_f_6wepoll_6socket_6socket_7timeout_tim
3768
3779
  return __pyx_r;
3769
3780
  }
3770
3781
 
3771
- /* "wepoll/_wepoll.pyx":344
3772
- *
3782
+ /* "wepoll/_wepoll.pyx":361
3783
+ * # cpython capsule if we wish...
3773
3784
  *
3774
- * cdef SOCKET fd_from_object(object obj) except -1: # <<<<<<<<<<<<<<
3775
- * cdef uintptr_t fd
3776
- * if SocketType_Check(obj):
3785
+ * cdef SOCKET _fd_from_object(self, object obj) except -1: # <<<<<<<<<<<<<<
3786
+ * # Made threasafe in 0.1.3 by only making init need to cimport the capsule.
3787
+ * if PyObject_TypeCheck(obj, self.socket_api.Sock_Type):
3777
3788
  */
3778
3789
 
3779
- static SOCKET __pyx_f_6wepoll_7_wepoll_fd_from_object(PyObject *__pyx_v_obj) {
3780
- uintptr_t __pyx_v_fd;
3790
+ static SOCKET __pyx_f_6wepoll_7_wepoll_5epoll__fd_from_object(struct __pyx_obj_6wepoll_7_wepoll_epoll *__pyx_v_self, PyObject *__pyx_v_obj) {
3781
3791
  SOCKET __pyx_r;
3782
3792
  __Pyx_RefNannyDeclarations
3783
3793
  int __pyx_t_1;
3784
- int __pyx_t_2;
3794
+ PyObject *__pyx_t_2 = NULL;
3785
3795
  SOCKET __pyx_t_3;
3786
3796
  PyObject *__pyx_t_4 = NULL;
3787
- PyObject *__pyx_t_5 = NULL;
3788
3797
  int __pyx_lineno = 0;
3789
3798
  const char *__pyx_filename = NULL;
3790
3799
  int __pyx_clineno = 0;
3791
- __Pyx_RefNannySetupContext("fd_from_object", 0);
3792
-
3793
- /* "wepoll/_wepoll.pyx":346
3794
- * cdef SOCKET fd_from_object(object obj) except -1:
3795
- * cdef uintptr_t fd
3796
- * if SocketType_Check(obj): # <<<<<<<<<<<<<<
3797
- * if Socket_GetFileDescriptor(obj, &fd) < 0:
3798
- * return -1
3799
- */
3800
- __pyx_t_1 = SocketType_Check(__pyx_v_obj); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 346, __pyx_L1_error)
3801
- __pyx_t_2 = (__pyx_t_1 != 0);
3802
- if (__pyx_t_2) {
3803
-
3804
- /* "wepoll/_wepoll.pyx":347
3805
- * cdef uintptr_t fd
3806
- * if SocketType_Check(obj):
3807
- * if Socket_GetFileDescriptor(obj, &fd) < 0: # <<<<<<<<<<<<<<
3808
- * return -1
3809
- * return fd
3810
- */
3811
- __pyx_t_2 = (Socket_GetFileDescriptor(__pyx_v_obj, (&__pyx_v_fd)) < 0);
3812
- if (__pyx_t_2) {
3813
-
3814
- /* "wepoll/_wepoll.pyx":348
3815
- * if SocketType_Check(obj):
3816
- * if Socket_GetFileDescriptor(obj, &fd) < 0:
3817
- * return -1 # <<<<<<<<<<<<<<
3818
- * return fd
3819
- * elif isinstance(obj, int):
3820
- */
3821
- __pyx_r = -1L;
3822
- goto __pyx_L0;
3800
+ __Pyx_RefNannySetupContext("_fd_from_object", 0);
3823
3801
 
3824
- /* "wepoll/_wepoll.pyx":347
3825
- * cdef uintptr_t fd
3826
- * if SocketType_Check(obj):
3827
- * if Socket_GetFileDescriptor(obj, &fd) < 0: # <<<<<<<<<<<<<<
3828
- * return -1
3829
- * return fd
3802
+ /* "wepoll/_wepoll.pyx":363
3803
+ * cdef SOCKET _fd_from_object(self, object obj) except -1:
3804
+ * # Made threasafe in 0.1.3 by only making init need to cimport the capsule.
3805
+ * if PyObject_TypeCheck(obj, self.socket_api.Sock_Type): # <<<<<<<<<<<<<<
3806
+ * return (<socket>obj).sock_fd
3807
+ * elif isinstance(obj, int):
3830
3808
  */
3831
- }
3809
+ __pyx_t_1 = PyObject_TypeCheck(__pyx_v_obj, __pyx_v_self->socket_api->Sock_Type);
3810
+ if (__pyx_t_1) {
3832
3811
 
3833
- /* "wepoll/_wepoll.pyx":349
3834
- * if Socket_GetFileDescriptor(obj, &fd) < 0:
3835
- * return -1
3836
- * return fd # <<<<<<<<<<<<<<
3837
- * elif isinstance(obj, int):
3838
- * return obj
3812
+ /* "wepoll/_wepoll.pyx":364
3813
+ * # Made threasafe in 0.1.3 by only making init need to cimport the capsule.
3814
+ * if PyObject_TypeCheck(obj, self.socket_api.Sock_Type):
3815
+ * return (<socket>obj).sock_fd # <<<<<<<<<<<<<<
3816
+ * elif isinstance(obj, int):
3817
+ * return <SOCKET>obj
3839
3818
  */
3840
- __pyx_r = __pyx_v_fd;
3819
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_sock_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
3820
+ __Pyx_GOTREF(__pyx_t_2);
3821
+ __pyx_t_3 = __Pyx_PyLong_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((SOCKET)-1)) && PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L1_error)
3822
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3823
+ __pyx_r = __pyx_t_3;
3841
3824
  goto __pyx_L0;
3842
3825
 
3843
- /* "wepoll/_wepoll.pyx":346
3844
- * cdef SOCKET fd_from_object(object obj) except -1:
3845
- * cdef uintptr_t fd
3846
- * if SocketType_Check(obj): # <<<<<<<<<<<<<<
3847
- * if Socket_GetFileDescriptor(obj, &fd) < 0:
3848
- * return -1
3826
+ /* "wepoll/_wepoll.pyx":363
3827
+ * cdef SOCKET _fd_from_object(self, object obj) except -1:
3828
+ * # Made threasafe in 0.1.3 by only making init need to cimport the capsule.
3829
+ * if PyObject_TypeCheck(obj, self.socket_api.Sock_Type): # <<<<<<<<<<<<<<
3830
+ * return (<socket>obj).sock_fd
3831
+ * elif isinstance(obj, int):
3849
3832
  */
3850
3833
  }
3851
3834
 
3852
- /* "wepoll/_wepoll.pyx":350
3853
- * return -1
3854
- * return fd
3855
- * elif isinstance(obj, int): # <<<<<<<<<<<<<<
3856
- * return obj
3857
- * else:
3835
+ /* "wepoll/_wepoll.pyx":365
3836
+ * if PyObject_TypeCheck(obj, self.socket_api.Sock_Type):
3837
+ * return (<socket>obj).sock_fd
3838
+ * elif isinstance(obj, int): # <<<<<<<<<<<<<<
3839
+ * return <SOCKET>obj
3840
+ * else:
3858
3841
  */
3859
- __pyx_t_2 = PyLong_Check(__pyx_v_obj);
3860
- if (__pyx_t_2) {
3842
+ __pyx_t_1 = PyLong_Check(__pyx_v_obj);
3843
+ if (__pyx_t_1) {
3861
3844
 
3862
- /* "wepoll/_wepoll.pyx":351
3863
- * return fd
3864
- * elif isinstance(obj, int):
3865
- * return obj # <<<<<<<<<<<<<<
3866
- * else:
3867
- * PyErr_SetObject(TypeError, f"{obj!r} not supported")
3845
+ /* "wepoll/_wepoll.pyx":366
3846
+ * return (<socket>obj).sock_fd
3847
+ * elif isinstance(obj, int):
3848
+ * return <SOCKET>obj # <<<<<<<<<<<<<<
3849
+ * else:
3850
+ * PyErr_SetObject(TypeError, f"{obj!r} not supported")
3868
3851
  */
3869
- __pyx_t_3 = __Pyx_PyLong_As_size_t(__pyx_v_obj); if (unlikely((__pyx_t_3 == ((SOCKET)-1)) && PyErr_Occurred())) __PYX_ERR(0, 351, __pyx_L1_error)
3870
- __pyx_r = __pyx_t_3;
3852
+ __pyx_t_3 = __Pyx_PyLong_As_size_t(__pyx_v_obj); if (unlikely((__pyx_t_3 == ((SOCKET)-1)) && PyErr_Occurred())) __PYX_ERR(0, 366, __pyx_L1_error)
3853
+ __pyx_r = ((SOCKET)__pyx_t_3);
3871
3854
  goto __pyx_L0;
3872
3855
 
3873
- /* "wepoll/_wepoll.pyx":350
3874
- * return -1
3875
- * return fd
3876
- * elif isinstance(obj, int): # <<<<<<<<<<<<<<
3877
- * return obj
3878
- * else:
3856
+ /* "wepoll/_wepoll.pyx":365
3857
+ * if PyObject_TypeCheck(obj, self.socket_api.Sock_Type):
3858
+ * return (<socket>obj).sock_fd
3859
+ * elif isinstance(obj, int): # <<<<<<<<<<<<<<
3860
+ * return <SOCKET>obj
3861
+ * else:
3879
3862
  */
3880
3863
  }
3881
3864
 
3882
- /* "wepoll/_wepoll.pyx":353
3883
- * return obj
3884
- * else:
3885
- * PyErr_SetObject(TypeError, f"{obj!r} not supported") # <<<<<<<<<<<<<<
3886
- * return -1
3865
+ /* "wepoll/_wepoll.pyx":368
3866
+ * return <SOCKET>obj
3867
+ * else:
3868
+ * PyErr_SetObject(TypeError, f"{obj!r} not supported") # <<<<<<<<<<<<<<
3869
+ * return -1
3887
3870
  *
3888
3871
  */
3889
3872
  /*else*/ {
3890
- __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_obj), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L1_error)
3873
+ __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_obj), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
3874
+ __Pyx_GOTREF(__pyx_t_2);
3875
+ __pyx_t_4 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_not_supported); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 368, __pyx_L1_error)
3891
3876
  __Pyx_GOTREF(__pyx_t_4);
3892
- __pyx_t_5 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_not_supported); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 353, __pyx_L1_error)
3893
- __Pyx_GOTREF(__pyx_t_5);
3877
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3878
+ PyErr_SetObject(__pyx_builtin_TypeError, __pyx_t_4);
3894
3879
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3895
- PyErr_SetObject(__pyx_builtin_TypeError, __pyx_t_5);
3896
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3897
3880
 
3898
- /* "wepoll/_wepoll.pyx":354
3899
- * else:
3900
- * PyErr_SetObject(TypeError, f"{obj!r} not supported")
3901
- * return -1 # <<<<<<<<<<<<<<
3902
- *
3881
+ /* "wepoll/_wepoll.pyx":369
3882
+ * else:
3883
+ * PyErr_SetObject(TypeError, f"{obj!r} not supported")
3884
+ * return -1 # <<<<<<<<<<<<<<
3903
3885
  *
3886
+ * # would've used nogil but it did not feel as clean as PyEval was
3904
3887
  */
3905
3888
  __pyx_r = -1L;
3906
3889
  goto __pyx_L0;
3907
3890
  }
3908
3891
 
3909
- /* "wepoll/_wepoll.pyx":344
3892
+ /* "wepoll/_wepoll.pyx":361
3893
+ * # cpython capsule if we wish...
3910
3894
  *
3911
- *
3912
- * cdef SOCKET fd_from_object(object obj) except -1: # <<<<<<<<<<<<<<
3913
- * cdef uintptr_t fd
3914
- * if SocketType_Check(obj):
3895
+ * cdef SOCKET _fd_from_object(self, object obj) except -1: # <<<<<<<<<<<<<<
3896
+ * # Made threasafe in 0.1.3 by only making init need to cimport the capsule.
3897
+ * if PyObject_TypeCheck(obj, self.socket_api.Sock_Type):
3915
3898
  */
3916
3899
 
3917
3900
  /* function exit code */
3918
3901
  __pyx_L1_error:;
3902
+ __Pyx_XDECREF(__pyx_t_2);
3919
3903
  __Pyx_XDECREF(__pyx_t_4);
3920
- __Pyx_XDECREF(__pyx_t_5);
3921
- __Pyx_AddTraceback("wepoll._wepoll.fd_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
3904
+ __Pyx_AddTraceback("wepoll._wepoll.epoll._fd_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
3922
3905
  __pyx_r = -1;
3923
3906
  __pyx_L0:;
3924
3907
  __Pyx_RefNannyFinishContext();
3925
3908
  return __pyx_r;
3926
3909
  }
3927
3910
 
3928
- /* "wepoll/_wepoll.pyx":365
3911
+ /* "wepoll/_wepoll.pyx":372
3929
3912
  *
3930
3913
  * # would've used nogil but it did not feel as clean as PyEval was
3931
3914
  * cdef int _create(self, int sizehint): # <<<<<<<<<<<<<<
@@ -3939,7 +3922,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create(struct __pyx_obj_6wepoll_7_we
3939
3922
  int __pyx_t_1;
3940
3923
  int __pyx_t_2;
3941
3924
 
3942
- /* "wepoll/_wepoll.pyx":368
3925
+ /* "wepoll/_wepoll.pyx":375
3943
3926
  * # cdef PyThreadState* save = PyEval_SaveThread()
3944
3927
  * cdef void* handle
3945
3928
  * with nogil: # <<<<<<<<<<<<<<
@@ -3953,7 +3936,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create(struct __pyx_obj_6wepoll_7_we
3953
3936
  __Pyx_FastGIL_Remember();
3954
3937
  /*try:*/ {
3955
3938
 
3956
- /* "wepoll/_wepoll.pyx":369
3939
+ /* "wepoll/_wepoll.pyx":376
3957
3940
  * cdef void* handle
3958
3941
  * with nogil:
3959
3942
  * handle = epoll_create(sizehint) # <<<<<<<<<<<<<<
@@ -3963,7 +3946,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create(struct __pyx_obj_6wepoll_7_we
3963
3946
  __pyx_v_handle = epoll_create(__pyx_v_sizehint);
3964
3947
  }
3965
3948
 
3966
- /* "wepoll/_wepoll.pyx":368
3949
+ /* "wepoll/_wepoll.pyx":375
3967
3950
  * # cdef PyThreadState* save = PyEval_SaveThread()
3968
3951
  * cdef void* handle
3969
3952
  * with nogil: # <<<<<<<<<<<<<<
@@ -3980,7 +3963,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create(struct __pyx_obj_6wepoll_7_we
3980
3963
  }
3981
3964
  }
3982
3965
 
3983
- /* "wepoll/_wepoll.pyx":370
3966
+ /* "wepoll/_wepoll.pyx":377
3984
3967
  * with nogil:
3985
3968
  * handle = epoll_create(sizehint)
3986
3969
  * self.handle = handle # <<<<<<<<<<<<<<
@@ -3989,7 +3972,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create(struct __pyx_obj_6wepoll_7_we
3989
3972
  */
3990
3973
  __pyx_v_self->handle = __pyx_v_handle;
3991
3974
 
3992
- /* "wepoll/_wepoll.pyx":371
3975
+ /* "wepoll/_wepoll.pyx":378
3993
3976
  * handle = epoll_create(sizehint)
3994
3977
  * self.handle = handle
3995
3978
  * return -1 if self.handle == NULL else 0 # <<<<<<<<<<<<<<
@@ -4005,7 +3988,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create(struct __pyx_obj_6wepoll_7_we
4005
3988
  __pyx_r = __pyx_t_1;
4006
3989
  goto __pyx_L0;
4007
3990
 
4008
- /* "wepoll/_wepoll.pyx":365
3991
+ /* "wepoll/_wepoll.pyx":372
4009
3992
  *
4010
3993
  * # would've used nogil but it did not feel as clean as PyEval was
4011
3994
  * cdef int _create(self, int sizehint): # <<<<<<<<<<<<<<
@@ -4018,7 +4001,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create(struct __pyx_obj_6wepoll_7_we
4018
4001
  return __pyx_r;
4019
4002
  }
4020
4003
 
4021
- /* "wepoll/_wepoll.pyx":373
4004
+ /* "wepoll/_wepoll.pyx":380
4022
4005
  * return -1 if self.handle == NULL else 0
4023
4006
  *
4024
4007
  * cdef int _create1(self): # <<<<<<<<<<<<<<
@@ -4032,7 +4015,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create1(struct __pyx_obj_6wepoll_7_w
4032
4015
  int __pyx_t_1;
4033
4016
  int __pyx_t_2;
4034
4017
 
4035
- /* "wepoll/_wepoll.pyx":375
4018
+ /* "wepoll/_wepoll.pyx":382
4036
4019
  * cdef int _create1(self):
4037
4020
  * cdef void* handle
4038
4021
  * with nogil: # <<<<<<<<<<<<<<
@@ -4046,7 +4029,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create1(struct __pyx_obj_6wepoll_7_w
4046
4029
  __Pyx_FastGIL_Remember();
4047
4030
  /*try:*/ {
4048
4031
 
4049
- /* "wepoll/_wepoll.pyx":376
4032
+ /* "wepoll/_wepoll.pyx":383
4050
4033
  * cdef void* handle
4051
4034
  * with nogil:
4052
4035
  * handle = epoll_create1(0) # <<<<<<<<<<<<<<
@@ -4056,7 +4039,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create1(struct __pyx_obj_6wepoll_7_w
4056
4039
  __pyx_v_handle = epoll_create1(0);
4057
4040
  }
4058
4041
 
4059
- /* "wepoll/_wepoll.pyx":375
4042
+ /* "wepoll/_wepoll.pyx":382
4060
4043
  * cdef int _create1(self):
4061
4044
  * cdef void* handle
4062
4045
  * with nogil: # <<<<<<<<<<<<<<
@@ -4073,7 +4056,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create1(struct __pyx_obj_6wepoll_7_w
4073
4056
  }
4074
4057
  }
4075
4058
 
4076
- /* "wepoll/_wepoll.pyx":377
4059
+ /* "wepoll/_wepoll.pyx":384
4077
4060
  * with nogil:
4078
4061
  * handle = epoll_create1(0)
4079
4062
  * self.handle = handle # <<<<<<<<<<<<<<
@@ -4082,7 +4065,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create1(struct __pyx_obj_6wepoll_7_w
4082
4065
  */
4083
4066
  __pyx_v_self->handle = __pyx_v_handle;
4084
4067
 
4085
- /* "wepoll/_wepoll.pyx":378
4068
+ /* "wepoll/_wepoll.pyx":385
4086
4069
  * handle = epoll_create1(0)
4087
4070
  * self.handle = handle
4088
4071
  * return -1 if self.handle == NULL else 0 # <<<<<<<<<<<<<<
@@ -4098,7 +4081,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create1(struct __pyx_obj_6wepoll_7_w
4098
4081
  __pyx_r = __pyx_t_1;
4099
4082
  goto __pyx_L0;
4100
4083
 
4101
- /* "wepoll/_wepoll.pyx":373
4084
+ /* "wepoll/_wepoll.pyx":380
4102
4085
  * return -1 if self.handle == NULL else 0
4103
4086
  *
4104
4087
  * cdef int _create1(self): # <<<<<<<<<<<<<<
@@ -4111,7 +4094,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__create1(struct __pyx_obj_6wepoll_7_w
4111
4094
  return __pyx_r;
4112
4095
  }
4113
4096
 
4114
- /* "wepoll/_wepoll.pyx":380
4097
+ /* "wepoll/_wepoll.pyx":387
4115
4098
  * return -1 if self.handle == NULL else 0
4116
4099
  *
4117
4100
  * cdef int _close(self): # <<<<<<<<<<<<<<
@@ -4126,7 +4109,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wep
4126
4109
  HANDLE __pyx_t_1;
4127
4110
  int __pyx_t_2;
4128
4111
 
4129
- /* "wepoll/_wepoll.pyx":381
4112
+ /* "wepoll/_wepoll.pyx":388
4130
4113
  *
4131
4114
  * cdef int _close(self):
4132
4115
  * cdef void* handle = self.handle # <<<<<<<<<<<<<<
@@ -4136,7 +4119,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wep
4136
4119
  __pyx_t_1 = __pyx_v_self->handle;
4137
4120
  __pyx_v_handle = __pyx_t_1;
4138
4121
 
4139
- /* "wepoll/_wepoll.pyx":383
4122
+ /* "wepoll/_wepoll.pyx":390
4140
4123
  * cdef void* handle = self.handle
4141
4124
  * cdef int ret
4142
4125
  * with nogil: # <<<<<<<<<<<<<<
@@ -4150,7 +4133,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wep
4150
4133
  __Pyx_FastGIL_Remember();
4151
4134
  /*try:*/ {
4152
4135
 
4153
- /* "wepoll/_wepoll.pyx":384
4136
+ /* "wepoll/_wepoll.pyx":391
4154
4137
  * cdef int ret
4155
4138
  * with nogil:
4156
4139
  * ret = epoll_close(handle) # <<<<<<<<<<<<<<
@@ -4159,7 +4142,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wep
4159
4142
  */
4160
4143
  __pyx_v_ret = epoll_close(__pyx_v_handle);
4161
4144
 
4162
- /* "wepoll/_wepoll.pyx":385
4145
+ /* "wepoll/_wepoll.pyx":392
4163
4146
  * with nogil:
4164
4147
  * ret = epoll_close(handle)
4165
4148
  * if ret < 0: # <<<<<<<<<<<<<<
@@ -4169,7 +4152,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wep
4169
4152
  __pyx_t_2 = (__pyx_v_ret < 0);
4170
4153
  if (__pyx_t_2) {
4171
4154
 
4172
- /* "wepoll/_wepoll.pyx":386
4155
+ /* "wepoll/_wepoll.pyx":393
4173
4156
  * ret = epoll_close(handle)
4174
4157
  * if ret < 0:
4175
4158
  * wepoll_set_errno(ret) # <<<<<<<<<<<<<<
@@ -4178,7 +4161,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wep
4178
4161
  */
4179
4162
  wepoll_set_errno(__pyx_v_ret);
4180
4163
 
4181
- /* "wepoll/_wepoll.pyx":385
4164
+ /* "wepoll/_wepoll.pyx":392
4182
4165
  * with nogil:
4183
4166
  * ret = epoll_close(handle)
4184
4167
  * if ret < 0: # <<<<<<<<<<<<<<
@@ -4188,7 +4171,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wep
4188
4171
  }
4189
4172
  }
4190
4173
 
4191
- /* "wepoll/_wepoll.pyx":383
4174
+ /* "wepoll/_wepoll.pyx":390
4192
4175
  * cdef void* handle = self.handle
4193
4176
  * cdef int ret
4194
4177
  * with nogil: # <<<<<<<<<<<<<<
@@ -4205,7 +4188,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wep
4205
4188
  }
4206
4189
  }
4207
4190
 
4208
- /* "wepoll/_wepoll.pyx":387
4191
+ /* "wepoll/_wepoll.pyx":394
4209
4192
  * if ret < 0:
4210
4193
  * wepoll_set_errno(ret)
4211
4194
  * return ret # <<<<<<<<<<<<<<
@@ -4215,7 +4198,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wep
4215
4198
  __pyx_r = __pyx_v_ret;
4216
4199
  goto __pyx_L0;
4217
4200
 
4218
- /* "wepoll/_wepoll.pyx":380
4201
+ /* "wepoll/_wepoll.pyx":387
4219
4202
  * return -1 if self.handle == NULL else 0
4220
4203
  *
4221
4204
  * cdef int _close(self): # <<<<<<<<<<<<<<
@@ -4228,7 +4211,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__close(struct __pyx_obj_6wepoll_7_wep
4228
4211
  return __pyx_r;
4229
4212
  }
4230
4213
 
4231
- /* "wepoll/_wepoll.pyx":392
4214
+ /* "wepoll/_wepoll.pyx":399
4232
4215
  * # other types of data besides just sockets can get polled.
4233
4216
  *
4234
4217
  * cdef int _ctl(self, int op, SOCKET sock, epoll_event* event) except -1: # <<<<<<<<<<<<<<
@@ -4247,7 +4230,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__ctl(struct __pyx_obj_6wepoll_7_wepol
4247
4230
  const char *__pyx_filename = NULL;
4248
4231
  int __pyx_clineno = 0;
4249
4232
 
4250
- /* "wepoll/_wepoll.pyx":393
4233
+ /* "wepoll/_wepoll.pyx":400
4251
4234
  *
4252
4235
  * cdef int _ctl(self, int op, SOCKET sock, epoll_event* event) except -1:
4253
4236
  * cdef void* handle = self.handle # <<<<<<<<<<<<<<
@@ -4257,7 +4240,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__ctl(struct __pyx_obj_6wepoll_7_wepol
4257
4240
  __pyx_t_1 = __pyx_v_self->handle;
4258
4241
  __pyx_v_handle = __pyx_t_1;
4259
4242
 
4260
- /* "wepoll/_wepoll.pyx":395
4243
+ /* "wepoll/_wepoll.pyx":402
4261
4244
  * cdef void* handle = self.handle
4262
4245
  * cdef int ret
4263
4246
  * with nogil: # <<<<<<<<<<<<<<
@@ -4271,7 +4254,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__ctl(struct __pyx_obj_6wepoll_7_wepol
4271
4254
  __Pyx_FastGIL_Remember();
4272
4255
  /*try:*/ {
4273
4256
 
4274
- /* "wepoll/_wepoll.pyx":396
4257
+ /* "wepoll/_wepoll.pyx":403
4275
4258
  * cdef int ret
4276
4259
  * with nogil:
4277
4260
  * ret = epoll_ctl(handle, op, sock, event) # <<<<<<<<<<<<<<
@@ -4281,7 +4264,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__ctl(struct __pyx_obj_6wepoll_7_wepol
4281
4264
  __pyx_v_ret = epoll_ctl(__pyx_v_handle, __pyx_v_op, __pyx_v_sock, __pyx_v_event);
4282
4265
  }
4283
4266
 
4284
- /* "wepoll/_wepoll.pyx":395
4267
+ /* "wepoll/_wepoll.pyx":402
4285
4268
  * cdef void* handle = self.handle
4286
4269
  * cdef int ret
4287
4270
  * with nogil: # <<<<<<<<<<<<<<
@@ -4298,7 +4281,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__ctl(struct __pyx_obj_6wepoll_7_wepol
4298
4281
  }
4299
4282
  }
4300
4283
 
4301
- /* "wepoll/_wepoll.pyx":398
4284
+ /* "wepoll/_wepoll.pyx":405
4302
4285
  * ret = epoll_ctl(handle, op, sock, event)
4303
4286
  *
4304
4287
  * if ret < 0: # <<<<<<<<<<<<<<
@@ -4308,16 +4291,16 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__ctl(struct __pyx_obj_6wepoll_7_wepol
4308
4291
  __pyx_t_2 = (__pyx_v_ret < 0);
4309
4292
  if (__pyx_t_2) {
4310
4293
 
4311
- /* "wepoll/_wepoll.pyx":399
4294
+ /* "wepoll/_wepoll.pyx":406
4312
4295
  *
4313
4296
  * if ret < 0:
4314
4297
  * PyErr_SetFromErrno(OSError) # <<<<<<<<<<<<<<
4315
4298
  * return -1
4316
4299
  * return ret
4317
4300
  */
4318
- __pyx_t_3 = PyErr_SetFromErrno(__pyx_builtin_OSError); if (unlikely(__pyx_t_3 == ((PyObject *)0))) __PYX_ERR(0, 399, __pyx_L1_error)
4301
+ __pyx_t_3 = PyErr_SetFromErrno(__pyx_builtin_OSError); if (unlikely(__pyx_t_3 == ((PyObject *)0))) __PYX_ERR(0, 406, __pyx_L1_error)
4319
4302
 
4320
- /* "wepoll/_wepoll.pyx":400
4303
+ /* "wepoll/_wepoll.pyx":407
4321
4304
  * if ret < 0:
4322
4305
  * PyErr_SetFromErrno(OSError)
4323
4306
  * return -1 # <<<<<<<<<<<<<<
@@ -4327,7 +4310,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__ctl(struct __pyx_obj_6wepoll_7_wepol
4327
4310
  __pyx_r = -1;
4328
4311
  goto __pyx_L0;
4329
4312
 
4330
- /* "wepoll/_wepoll.pyx":398
4313
+ /* "wepoll/_wepoll.pyx":405
4331
4314
  * ret = epoll_ctl(handle, op, sock, event)
4332
4315
  *
4333
4316
  * if ret < 0: # <<<<<<<<<<<<<<
@@ -4336,7 +4319,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__ctl(struct __pyx_obj_6wepoll_7_wepol
4336
4319
  */
4337
4320
  }
4338
4321
 
4339
- /* "wepoll/_wepoll.pyx":401
4322
+ /* "wepoll/_wepoll.pyx":408
4340
4323
  * PyErr_SetFromErrno(OSError)
4341
4324
  * return -1
4342
4325
  * return ret # <<<<<<<<<<<<<<
@@ -4346,7 +4329,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__ctl(struct __pyx_obj_6wepoll_7_wepol
4346
4329
  __pyx_r = __pyx_v_ret;
4347
4330
  goto __pyx_L0;
4348
4331
 
4349
- /* "wepoll/_wepoll.pyx":392
4332
+ /* "wepoll/_wepoll.pyx":399
4350
4333
  * # other types of data besides just sockets can get polled.
4351
4334
  *
4352
4335
  * cdef int _ctl(self, int op, SOCKET sock, epoll_event* event) except -1: # <<<<<<<<<<<<<<
@@ -4362,7 +4345,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__ctl(struct __pyx_obj_6wepoll_7_wepol
4362
4345
  return __pyx_r;
4363
4346
  }
4364
4347
 
4365
- /* "wepoll/_wepoll.pyx":403
4348
+ /* "wepoll/_wepoll.pyx":410
4366
4349
  * return ret
4367
4350
  *
4368
4351
  * cdef int _wait(self, epoll_event* events, int maxevents, int timeout): # <<<<<<<<<<<<<<
@@ -4376,7 +4359,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__wait(struct __pyx_obj_6wepoll_7_wepo
4376
4359
  int __pyx_r;
4377
4360
  HANDLE __pyx_t_1;
4378
4361
 
4379
- /* "wepoll/_wepoll.pyx":404
4362
+ /* "wepoll/_wepoll.pyx":411
4380
4363
  *
4381
4364
  * cdef int _wait(self, epoll_event* events, int maxevents, int timeout):
4382
4365
  * cdef void* handle = self.handle # <<<<<<<<<<<<<<
@@ -4386,7 +4369,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__wait(struct __pyx_obj_6wepoll_7_wepo
4386
4369
  __pyx_t_1 = __pyx_v_self->handle;
4387
4370
  __pyx_v_handle = __pyx_t_1;
4388
4371
 
4389
- /* "wepoll/_wepoll.pyx":406
4372
+ /* "wepoll/_wepoll.pyx":413
4390
4373
  * cdef void* handle = self.handle
4391
4374
  * cdef int ret
4392
4375
  * with nogil: # <<<<<<<<<<<<<<
@@ -4400,7 +4383,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__wait(struct __pyx_obj_6wepoll_7_wepo
4400
4383
  __Pyx_FastGIL_Remember();
4401
4384
  /*try:*/ {
4402
4385
 
4403
- /* "wepoll/_wepoll.pyx":407
4386
+ /* "wepoll/_wepoll.pyx":414
4404
4387
  * cdef int ret
4405
4388
  * with nogil:
4406
4389
  * ret = epoll_wait(self.handle, events, maxevents, timeout) # <<<<<<<<<<<<<<
@@ -4410,7 +4393,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__wait(struct __pyx_obj_6wepoll_7_wepo
4410
4393
  __pyx_v_ret = epoll_wait(__pyx_v_self->handle, __pyx_v_events, __pyx_v_maxevents, __pyx_v_timeout);
4411
4394
  }
4412
4395
 
4413
- /* "wepoll/_wepoll.pyx":406
4396
+ /* "wepoll/_wepoll.pyx":413
4414
4397
  * cdef void* handle = self.handle
4415
4398
  * cdef int ret
4416
4399
  * with nogil: # <<<<<<<<<<<<<<
@@ -4427,7 +4410,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__wait(struct __pyx_obj_6wepoll_7_wepo
4427
4410
  }
4428
4411
  }
4429
4412
 
4430
- /* "wepoll/_wepoll.pyx":408
4413
+ /* "wepoll/_wepoll.pyx":415
4431
4414
  * with nogil:
4432
4415
  * ret = epoll_wait(self.handle, events, maxevents, timeout)
4433
4416
  * return ret # <<<<<<<<<<<<<<
@@ -4437,7 +4420,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__wait(struct __pyx_obj_6wepoll_7_wepo
4437
4420
  __pyx_r = __pyx_v_ret;
4438
4421
  goto __pyx_L0;
4439
4422
 
4440
- /* "wepoll/_wepoll.pyx":403
4423
+ /* "wepoll/_wepoll.pyx":410
4441
4424
  * return ret
4442
4425
  *
4443
4426
  * cdef int _wait(self, epoll_event* events, int maxevents, int timeout): # <<<<<<<<<<<<<<
@@ -4450,7 +4433,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__wait(struct __pyx_obj_6wepoll_7_wepo
4450
4433
  return __pyx_r;
4451
4434
  }
4452
4435
 
4453
- /* "wepoll/_wepoll.pyx":410
4436
+ /* "wepoll/_wepoll.pyx":417
4454
4437
  * return ret
4455
4438
  *
4456
4439
  * cdef int _init(self, int sizehint, HANDLE handle): # <<<<<<<<<<<<<<
@@ -4466,7 +4449,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4466
4449
  const char *__pyx_filename = NULL;
4467
4450
  int __pyx_clineno = 0;
4468
4451
 
4469
- /* "wepoll/_wepoll.pyx":411
4452
+ /* "wepoll/_wepoll.pyx":418
4470
4453
  *
4471
4454
  * cdef int _init(self, int sizehint, HANDLE handle):
4472
4455
  * if handle == NULL: # <<<<<<<<<<<<<<
@@ -4476,7 +4459,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4476
4459
  __pyx_t_1 = (__pyx_v_handle == NULL);
4477
4460
  if (__pyx_t_1) {
4478
4461
 
4479
- /* "wepoll/_wepoll.pyx":412
4462
+ /* "wepoll/_wepoll.pyx":419
4480
4463
  * cdef int _init(self, int sizehint, HANDLE handle):
4481
4464
  * if handle == NULL:
4482
4465
  * if sizehint > 0: # <<<<<<<<<<<<<<
@@ -4486,16 +4469,16 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4486
4469
  __pyx_t_1 = (__pyx_v_sizehint > 0);
4487
4470
  if (__pyx_t_1) {
4488
4471
 
4489
- /* "wepoll/_wepoll.pyx":413
4472
+ /* "wepoll/_wepoll.pyx":420
4490
4473
  * if handle == NULL:
4491
4474
  * if sizehint > 0:
4492
4475
  * self._create(sizehint) # <<<<<<<<<<<<<<
4493
4476
  * else:
4494
4477
  * self._create1()
4495
4478
  */
4496
- __pyx_f_6wepoll_7_wepoll_5epoll__create(__pyx_v_self, __pyx_v_sizehint); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 413, __pyx_L1_error)
4479
+ __pyx_f_6wepoll_7_wepoll_5epoll__create(__pyx_v_self, __pyx_v_sizehint); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 420, __pyx_L1_error)
4497
4480
 
4498
- /* "wepoll/_wepoll.pyx":412
4481
+ /* "wepoll/_wepoll.pyx":419
4499
4482
  * cdef int _init(self, int sizehint, HANDLE handle):
4500
4483
  * if handle == NULL:
4501
4484
  * if sizehint > 0: # <<<<<<<<<<<<<<
@@ -4505,7 +4488,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4505
4488
  goto __pyx_L4;
4506
4489
  }
4507
4490
 
4508
- /* "wepoll/_wepoll.pyx":415
4491
+ /* "wepoll/_wepoll.pyx":422
4509
4492
  * self._create(sizehint)
4510
4493
  * else:
4511
4494
  * self._create1() # <<<<<<<<<<<<<<
@@ -4513,9 +4496,9 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4513
4496
  * if not SetHandleInformation(self.handle, HANDLE_FLAG_INHERIT, 0):
4514
4497
  */
4515
4498
  /*else*/ {
4516
- __pyx_f_6wepoll_7_wepoll_5epoll__create1(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 415, __pyx_L1_error)
4499
+ __pyx_f_6wepoll_7_wepoll_5epoll__create1(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 422, __pyx_L1_error)
4517
4500
 
4518
- /* "wepoll/_wepoll.pyx":417
4501
+ /* "wepoll/_wepoll.pyx":424
4519
4502
  * self._create1()
4520
4503
  * # optimzed version of _Py_set_inheritable for windows
4521
4504
  * if not SetHandleInformation(self.handle, HANDLE_FLAG_INHERIT, 0): # <<<<<<<<<<<<<<
@@ -4525,16 +4508,16 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4525
4508
  __pyx_t_1 = (!SetHandleInformation(__pyx_v_self->handle, HANDLE_FLAG_INHERIT, 0));
4526
4509
  if (__pyx_t_1) {
4527
4510
 
4528
- /* "wepoll/_wepoll.pyx":418
4511
+ /* "wepoll/_wepoll.pyx":425
4529
4512
  * # optimzed version of _Py_set_inheritable for windows
4530
4513
  * if not SetHandleInformation(self.handle, HANDLE_FLAG_INHERIT, 0):
4531
4514
  * PyErr_SetFromWindowsErr(0) # <<<<<<<<<<<<<<
4532
4515
  * return -1
4533
4516
  * else:
4534
4517
  */
4535
- __pyx_t_2 = PyErr_SetFromWindowsErr(0); if (unlikely(__pyx_t_2 == ((PyObject *)0))) __PYX_ERR(0, 418, __pyx_L1_error)
4518
+ __pyx_t_2 = PyErr_SetFromWindowsErr(0); if (unlikely(__pyx_t_2 == ((PyObject *)0))) __PYX_ERR(0, 425, __pyx_L1_error)
4536
4519
 
4537
- /* "wepoll/_wepoll.pyx":419
4520
+ /* "wepoll/_wepoll.pyx":426
4538
4521
  * if not SetHandleInformation(self.handle, HANDLE_FLAG_INHERIT, 0):
4539
4522
  * PyErr_SetFromWindowsErr(0)
4540
4523
  * return -1 # <<<<<<<<<<<<<<
@@ -4544,7 +4527,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4544
4527
  __pyx_r = -1;
4545
4528
  goto __pyx_L0;
4546
4529
 
4547
- /* "wepoll/_wepoll.pyx":417
4530
+ /* "wepoll/_wepoll.pyx":424
4548
4531
  * self._create1()
4549
4532
  * # optimzed version of _Py_set_inheritable for windows
4550
4533
  * if not SetHandleInformation(self.handle, HANDLE_FLAG_INHERIT, 0): # <<<<<<<<<<<<<<
@@ -4555,7 +4538,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4555
4538
  }
4556
4539
  __pyx_L4:;
4557
4540
 
4558
- /* "wepoll/_wepoll.pyx":411
4541
+ /* "wepoll/_wepoll.pyx":418
4559
4542
  *
4560
4543
  * cdef int _init(self, int sizehint, HANDLE handle):
4561
4544
  * if handle == NULL: # <<<<<<<<<<<<<<
@@ -4565,7 +4548,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4565
4548
  goto __pyx_L3;
4566
4549
  }
4567
4550
 
4568
- /* "wepoll/_wepoll.pyx":421
4551
+ /* "wepoll/_wepoll.pyx":428
4569
4552
  * return -1
4570
4553
  * else:
4571
4554
  * self.closed = 0 # <<<<<<<<<<<<<<
@@ -4575,7 +4558,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4575
4558
  /*else*/ {
4576
4559
  __pyx_v_self->closed = 0;
4577
4560
 
4578
- /* "wepoll/_wepoll.pyx":422
4561
+ /* "wepoll/_wepoll.pyx":429
4579
4562
  * else:
4580
4563
  * self.closed = 0
4581
4564
  * self.handle = handle # <<<<<<<<<<<<<<
@@ -4586,7 +4569,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4586
4569
  }
4587
4570
  __pyx_L3:;
4588
4571
 
4589
- /* "wepoll/_wepoll.pyx":423
4572
+ /* "wepoll/_wepoll.pyx":430
4590
4573
  * self.closed = 0
4591
4574
  * self.handle = handle
4592
4575
  * return 0 # <<<<<<<<<<<<<<
@@ -4596,7 +4579,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4596
4579
  __pyx_r = 0;
4597
4580
  goto __pyx_L0;
4598
4581
 
4599
- /* "wepoll/_wepoll.pyx":410
4582
+ /* "wepoll/_wepoll.pyx":417
4600
4583
  * return ret
4601
4584
  *
4602
4585
  * cdef int _init(self, int sizehint, HANDLE handle): # <<<<<<<<<<<<<<
@@ -4612,7 +4595,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__init(struct __pyx_obj_6wepoll_7_wepo
4612
4595
  return __pyx_r;
4613
4596
  }
4614
4597
 
4615
- /* "wepoll/_wepoll.pyx":426
4598
+ /* "wepoll/_wepoll.pyx":433
4616
4599
  *
4617
4600
  *
4618
4601
  * cdef int _handle_ctl_result(self, int result) except -1: # <<<<<<<<<<<<<<
@@ -4628,7 +4611,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__handle_ctl_result(CYTHON_UNUSED stru
4628
4611
  const char *__pyx_filename = NULL;
4629
4612
  int __pyx_clineno = 0;
4630
4613
 
4631
- /* "wepoll/_wepoll.pyx":427
4614
+ /* "wepoll/_wepoll.pyx":434
4632
4615
  *
4633
4616
  * cdef int _handle_ctl_result(self, int result) except -1:
4634
4617
  * if result < 0: # <<<<<<<<<<<<<<
@@ -4638,7 +4621,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__handle_ctl_result(CYTHON_UNUSED stru
4638
4621
  __pyx_t_1 = (__pyx_v_result < 0);
4639
4622
  if (__pyx_t_1) {
4640
4623
 
4641
- /* "wepoll/_wepoll.pyx":428
4624
+ /* "wepoll/_wepoll.pyx":435
4642
4625
  * cdef int _handle_ctl_result(self, int result) except -1:
4643
4626
  * if result < 0:
4644
4627
  * wepoll_set_errno(result) # <<<<<<<<<<<<<<
@@ -4647,16 +4630,16 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__handle_ctl_result(CYTHON_UNUSED stru
4647
4630
  */
4648
4631
  wepoll_set_errno(__pyx_v_result);
4649
4632
 
4650
- /* "wepoll/_wepoll.pyx":429
4633
+ /* "wepoll/_wepoll.pyx":436
4651
4634
  * if result < 0:
4652
4635
  * wepoll_set_errno(result)
4653
4636
  * PyErr_SetFromErrno(OSError) # <<<<<<<<<<<<<<
4654
4637
  * return -1
4655
4638
  * return 0
4656
4639
  */
4657
- __pyx_t_2 = PyErr_SetFromErrno(__pyx_builtin_OSError); if (unlikely(__pyx_t_2 == ((PyObject *)0))) __PYX_ERR(0, 429, __pyx_L1_error)
4640
+ __pyx_t_2 = PyErr_SetFromErrno(__pyx_builtin_OSError); if (unlikely(__pyx_t_2 == ((PyObject *)0))) __PYX_ERR(0, 436, __pyx_L1_error)
4658
4641
 
4659
- /* "wepoll/_wepoll.pyx":430
4642
+ /* "wepoll/_wepoll.pyx":437
4660
4643
  * wepoll_set_errno(result)
4661
4644
  * PyErr_SetFromErrno(OSError)
4662
4645
  * return -1 # <<<<<<<<<<<<<<
@@ -4666,7 +4649,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__handle_ctl_result(CYTHON_UNUSED stru
4666
4649
  __pyx_r = -1;
4667
4650
  goto __pyx_L0;
4668
4651
 
4669
- /* "wepoll/_wepoll.pyx":427
4652
+ /* "wepoll/_wepoll.pyx":434
4670
4653
  *
4671
4654
  * cdef int _handle_ctl_result(self, int result) except -1:
4672
4655
  * if result < 0: # <<<<<<<<<<<<<<
@@ -4675,7 +4658,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__handle_ctl_result(CYTHON_UNUSED stru
4675
4658
  */
4676
4659
  }
4677
4660
 
4678
- /* "wepoll/_wepoll.pyx":431
4661
+ /* "wepoll/_wepoll.pyx":438
4679
4662
  * PyErr_SetFromErrno(OSError)
4680
4663
  * return -1
4681
4664
  * return 0 # <<<<<<<<<<<<<<
@@ -4685,7 +4668,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__handle_ctl_result(CYTHON_UNUSED stru
4685
4668
  __pyx_r = 0;
4686
4669
  goto __pyx_L0;
4687
4670
 
4688
- /* "wepoll/_wepoll.pyx":426
4671
+ /* "wepoll/_wepoll.pyx":433
4689
4672
  *
4690
4673
  *
4691
4674
  * cdef int _handle_ctl_result(self, int result) except -1: # <<<<<<<<<<<<<<
@@ -4701,7 +4684,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__handle_ctl_result(CYTHON_UNUSED stru
4701
4684
  return __pyx_r;
4702
4685
  }
4703
4686
 
4704
- /* "wepoll/_wepoll.pyx":433
4687
+ /* "wepoll/_wepoll.pyx":440
4705
4688
  * return 0
4706
4689
  *
4707
4690
  * cdef int _pools_closed(self) except -1: # <<<<<<<<<<<<<<
@@ -4714,7 +4697,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(struct __pyx_obj_6wepol
4714
4697
  int __pyx_t_1;
4715
4698
  int __pyx_t_2;
4716
4699
 
4717
- /* "wepoll/_wepoll.pyx":434
4700
+ /* "wepoll/_wepoll.pyx":441
4718
4701
  *
4719
4702
  * cdef int _pools_closed(self) except -1:
4720
4703
  * if self.handle == NULL or self.closed: # <<<<<<<<<<<<<<
@@ -4731,7 +4714,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(struct __pyx_obj_6wepol
4731
4714
  __pyx_L4_bool_binop_done:;
4732
4715
  if (__pyx_t_1) {
4733
4716
 
4734
- /* "wepoll/_wepoll.pyx":436
4717
+ /* "wepoll/_wepoll.pyx":443
4735
4718
  * if self.handle == NULL or self.closed:
4736
4719
  * # Pools closed due to aids
4737
4720
  * PyErr_SetObject(RuntimeError, "I/O operation on closed epoll object") # <<<<<<<<<<<<<<
@@ -4740,7 +4723,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(struct __pyx_obj_6wepol
4740
4723
  */
4741
4724
  PyErr_SetObject(__pyx_builtin_RuntimeError, __pyx_mstate_global->__pyx_kp_u_I_O_operation_on_closed_epoll_ob);
4742
4725
 
4743
- /* "wepoll/_wepoll.pyx":437
4726
+ /* "wepoll/_wepoll.pyx":444
4744
4727
  * # Pools closed due to aids
4745
4728
  * PyErr_SetObject(RuntimeError, "I/O operation on closed epoll object")
4746
4729
  * return -1 # <<<<<<<<<<<<<<
@@ -4750,7 +4733,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(struct __pyx_obj_6wepol
4750
4733
  __pyx_r = -1;
4751
4734
  goto __pyx_L0;
4752
4735
 
4753
- /* "wepoll/_wepoll.pyx":434
4736
+ /* "wepoll/_wepoll.pyx":441
4754
4737
  *
4755
4738
  * cdef int _pools_closed(self) except -1:
4756
4739
  * if self.handle == NULL or self.closed: # <<<<<<<<<<<<<<
@@ -4759,7 +4742,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(struct __pyx_obj_6wepol
4759
4742
  */
4760
4743
  }
4761
4744
 
4762
- /* "wepoll/_wepoll.pyx":438
4745
+ /* "wepoll/_wepoll.pyx":445
4763
4746
  * PyErr_SetObject(RuntimeError, "I/O operation on closed epoll object")
4764
4747
  * return -1
4765
4748
  * return 0 # <<<<<<<<<<<<<<
@@ -4769,7 +4752,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(struct __pyx_obj_6wepol
4769
4752
  __pyx_r = 0;
4770
4753
  goto __pyx_L0;
4771
4754
 
4772
- /* "wepoll/_wepoll.pyx":433
4755
+ /* "wepoll/_wepoll.pyx":440
4773
4756
  * return 0
4774
4757
  *
4775
4758
  * cdef int _pools_closed(self) except -1: # <<<<<<<<<<<<<<
@@ -4782,7 +4765,7 @@ static int __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(struct __pyx_obj_6wepol
4782
4765
  return __pyx_r;
4783
4766
  }
4784
4767
 
4785
- /* "wepoll/_wepoll.pyx":441
4768
+ /* "wepoll/_wepoll.pyx":448
4786
4769
  *
4787
4770
  * # NOTE Flags are deprecated in select standard library so no point in using it here...
4788
4771
  * def __init__(self, int sizehint = -1): # <<<<<<<<<<<<<<
@@ -4812,37 +4795,37 @@ static int __pyx_pw_6wepoll_7_wepoll_5epoll_1__init__(PyObject *__pyx_v_self, Py
4812
4795
  {
4813
4796
  PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sizehint,0};
4814
4797
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
4815
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 441, __pyx_L3_error)
4798
+ if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 448, __pyx_L3_error)
4816
4799
  if (__pyx_kwds_len > 0) {
4817
4800
  switch (__pyx_nargs) {
4818
4801
  case 1:
4819
4802
  values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
4820
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 441, __pyx_L3_error)
4803
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 448, __pyx_L3_error)
4821
4804
  CYTHON_FALLTHROUGH;
4822
4805
  case 0: break;
4823
4806
  default: goto __pyx_L5_argtuple_error;
4824
4807
  }
4825
4808
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
4826
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 441, __pyx_L3_error)
4809
+ if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 448, __pyx_L3_error)
4827
4810
  } else {
4828
4811
  switch (__pyx_nargs) {
4829
4812
  case 1:
4830
4813
  values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
4831
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 441, __pyx_L3_error)
4814
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 448, __pyx_L3_error)
4832
4815
  CYTHON_FALLTHROUGH;
4833
4816
  case 0: break;
4834
4817
  default: goto __pyx_L5_argtuple_error;
4835
4818
  }
4836
4819
  }
4837
4820
  if (values[0]) {
4838
- __pyx_v_sizehint = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_sizehint == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L3_error)
4821
+ __pyx_v_sizehint = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_sizehint == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 448, __pyx_L3_error)
4839
4822
  } else {
4840
4823
  __pyx_v_sizehint = ((int)-1);
4841
4824
  }
4842
4825
  }
4843
4826
  goto __pyx_L6_skip;
4844
4827
  __pyx_L5_argtuple_error:;
4845
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 441, __pyx_L3_error)
4828
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 448, __pyx_L3_error)
4846
4829
  __pyx_L6_skip:;
4847
4830
  goto __pyx_L4_argument_unpacking_done;
4848
4831
  __pyx_L3_error:;
@@ -4871,13 +4854,14 @@ static int __pyx_pf_6wepoll_7_wepoll_5epoll___init__(struct __pyx_obj_6wepoll_7_
4871
4854
  PyObject *__pyx_t_3 = NULL;
4872
4855
  PyObject *__pyx_t_4 = NULL;
4873
4856
  size_t __pyx_t_5;
4874
- int __pyx_t_6;
4857
+ PySocketModule_APIObject *__pyx_t_6;
4858
+ int __pyx_t_7;
4875
4859
  int __pyx_lineno = 0;
4876
4860
  const char *__pyx_filename = NULL;
4877
4861
  int __pyx_clineno = 0;
4878
4862
  __Pyx_RefNannySetupContext("__init__", 0);
4879
4863
 
4880
- /* "wepoll/_wepoll.pyx":442
4864
+ /* "wepoll/_wepoll.pyx":449
4881
4865
  * # NOTE Flags are deprecated in select standard library so no point in using it here...
4882
4866
  * def __init__(self, int sizehint = -1):
4883
4867
  * if sizehint == -1: # <<<<<<<<<<<<<<
@@ -4887,7 +4871,7 @@ static int __pyx_pf_6wepoll_7_wepoll_5epoll___init__(struct __pyx_obj_6wepoll_7_
4887
4871
  __pyx_t_1 = (__pyx_v_sizehint == -1L);
4888
4872
  if (__pyx_t_1) {
4889
4873
 
4890
- /* "wepoll/_wepoll.pyx":443
4874
+ /* "wepoll/_wepoll.pyx":450
4891
4875
  * def __init__(self, int sizehint = -1):
4892
4876
  * if sizehint == -1:
4893
4877
  * sizehint = FD_SETSIZE - 1 # <<<<<<<<<<<<<<
@@ -4896,7 +4880,7 @@ static int __pyx_pf_6wepoll_7_wepoll_5epoll___init__(struct __pyx_obj_6wepoll_7_
4896
4880
  */
4897
4881
  __pyx_v_sizehint = 0x1ff;
4898
4882
 
4899
- /* "wepoll/_wepoll.pyx":442
4883
+ /* "wepoll/_wepoll.pyx":449
4900
4884
  * # NOTE Flags are deprecated in select standard library so no point in using it here...
4901
4885
  * def __init__(self, int sizehint = -1):
4902
4886
  * if sizehint == -1: # <<<<<<<<<<<<<<
@@ -4906,7 +4890,7 @@ static int __pyx_pf_6wepoll_7_wepoll_5epoll___init__(struct __pyx_obj_6wepoll_7_
4906
4890
  goto __pyx_L3;
4907
4891
  }
4908
4892
 
4909
- /* "wepoll/_wepoll.pyx":445
4893
+ /* "wepoll/_wepoll.pyx":452
4910
4894
  * sizehint = FD_SETSIZE - 1
4911
4895
  *
4912
4896
  * elif sizehint <= 0: # <<<<<<<<<<<<<<
@@ -4916,12 +4900,12 @@ static int __pyx_pf_6wepoll_7_wepoll_5epoll___init__(struct __pyx_obj_6wepoll_7_
4916
4900
  __pyx_t_1 = (__pyx_v_sizehint <= 0);
4917
4901
  if (unlikely(__pyx_t_1)) {
4918
4902
 
4919
- /* "wepoll/_wepoll.pyx":446
4903
+ /* "wepoll/_wepoll.pyx":453
4920
4904
  *
4921
4905
  * elif sizehint <= 0:
4922
4906
  * raise ValueError("negative sizehint") # <<<<<<<<<<<<<<
4923
4907
  *
4924
- * if self._init(sizehint, NULL) < 0:
4908
+ * # NOTE: Throw me an issue if a memory leak is noticable.
4925
4909
  */
4926
4910
  __pyx_t_3 = NULL;
4927
4911
  __Pyx_INCREF(__pyx_builtin_ValueError);
@@ -4932,14 +4916,14 @@ static int __pyx_pf_6wepoll_7_wepoll_5epoll___init__(struct __pyx_obj_6wepoll_7_
4932
4916
  __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
4933
4917
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4934
4918
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4935
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
4919
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error)
4936
4920
  __Pyx_GOTREF(__pyx_t_2);
4937
4921
  }
4938
4922
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4939
4923
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4940
- __PYX_ERR(0, 446, __pyx_L1_error)
4924
+ __PYX_ERR(0, 453, __pyx_L1_error)
4941
4925
 
4942
- /* "wepoll/_wepoll.pyx":445
4926
+ /* "wepoll/_wepoll.pyx":452
4943
4927
  * sizehint = FD_SETSIZE - 1
4944
4928
  *
4945
4929
  * elif sizehint <= 0: # <<<<<<<<<<<<<<
@@ -4949,18 +4933,57 @@ static int __pyx_pf_6wepoll_7_wepoll_5epoll___init__(struct __pyx_obj_6wepoll_7_
4949
4933
  }
4950
4934
  __pyx_L3:;
4951
4935
 
4952
- /* "wepoll/_wepoll.pyx":448
4953
- * raise ValueError("negative sizehint")
4936
+ /* "wepoll/_wepoll.pyx":457
4937
+ * # NOTE: Throw me an issue if a memory leak is noticable.
4938
+ * # I will then be able to diagnose if this was the reason.
4939
+ * self.socket_api = cimport_socket() # <<<<<<<<<<<<<<
4940
+ * if self.socket_api == NULL:
4941
+ * raise
4942
+ */
4943
+ __pyx_t_6 = cimport_socket(); if (unlikely(__pyx_t_6 == ((PySocketModule_APIObject *)0))) __PYX_ERR(0, 457, __pyx_L1_error)
4944
+ __pyx_v_self->socket_api = __pyx_t_6;
4945
+
4946
+ /* "wepoll/_wepoll.pyx":458
4947
+ * # I will then be able to diagnose if this was the reason.
4948
+ * self.socket_api = cimport_socket()
4949
+ * if self.socket_api == NULL: # <<<<<<<<<<<<<<
4950
+ * raise
4951
+ *
4952
+ */
4953
+ __pyx_t_1 = (__pyx_v_self->socket_api == NULL);
4954
+ if (unlikely(__pyx_t_1)) {
4955
+
4956
+ /* "wepoll/_wepoll.pyx":459
4957
+ * self.socket_api = cimport_socket()
4958
+ * if self.socket_api == NULL:
4959
+ * raise # <<<<<<<<<<<<<<
4960
+ *
4961
+ * if self._init(sizehint, NULL) < 0:
4962
+ */
4963
+ __Pyx_ReraiseException();
4964
+ __PYX_ERR(0, 459, __pyx_L1_error)
4965
+
4966
+ /* "wepoll/_wepoll.pyx":458
4967
+ * # I will then be able to diagnose if this was the reason.
4968
+ * self.socket_api = cimport_socket()
4969
+ * if self.socket_api == NULL: # <<<<<<<<<<<<<<
4970
+ * raise
4971
+ *
4972
+ */
4973
+ }
4974
+
4975
+ /* "wepoll/_wepoll.pyx":461
4976
+ * raise
4954
4977
  *
4955
4978
  * if self._init(sizehint, NULL) < 0: # <<<<<<<<<<<<<<
4956
4979
  * raise
4957
4980
  *
4958
4981
  */
4959
- __pyx_t_6 = __pyx_f_6wepoll_7_wepoll_5epoll__init(__pyx_v_self, __pyx_v_sizehint, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 448, __pyx_L1_error)
4960
- __pyx_t_1 = (__pyx_t_6 < 0);
4982
+ __pyx_t_7 = __pyx_f_6wepoll_7_wepoll_5epoll__init(__pyx_v_self, __pyx_v_sizehint, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 461, __pyx_L1_error)
4983
+ __pyx_t_1 = (__pyx_t_7 < 0);
4961
4984
  if (unlikely(__pyx_t_1)) {
4962
4985
 
4963
- /* "wepoll/_wepoll.pyx":449
4986
+ /* "wepoll/_wepoll.pyx":462
4964
4987
  *
4965
4988
  * if self._init(sizehint, NULL) < 0:
4966
4989
  * raise # <<<<<<<<<<<<<<
@@ -4968,10 +4991,10 @@ static int __pyx_pf_6wepoll_7_wepoll_5epoll___init__(struct __pyx_obj_6wepoll_7_
4968
4991
  * cpdef uintptr_t fileno(self):
4969
4992
  */
4970
4993
  __Pyx_ReraiseException();
4971
- __PYX_ERR(0, 449, __pyx_L1_error)
4994
+ __PYX_ERR(0, 462, __pyx_L1_error)
4972
4995
 
4973
- /* "wepoll/_wepoll.pyx":448
4974
- * raise ValueError("negative sizehint")
4996
+ /* "wepoll/_wepoll.pyx":461
4997
+ * raise
4975
4998
  *
4976
4999
  * if self._init(sizehint, NULL) < 0: # <<<<<<<<<<<<<<
4977
5000
  * raise
@@ -4979,7 +5002,7 @@ static int __pyx_pf_6wepoll_7_wepoll_5epoll___init__(struct __pyx_obj_6wepoll_7_
4979
5002
  */
4980
5003
  }
4981
5004
 
4982
- /* "wepoll/_wepoll.pyx":441
5005
+ /* "wepoll/_wepoll.pyx":448
4983
5006
  *
4984
5007
  * # NOTE Flags are deprecated in select standard library so no point in using it here...
4985
5008
  * def __init__(self, int sizehint = -1): # <<<<<<<<<<<<<<
@@ -5001,7 +5024,7 @@ static int __pyx_pf_6wepoll_7_wepoll_5epoll___init__(struct __pyx_obj_6wepoll_7_
5001
5024
  return __pyx_r;
5002
5025
  }
5003
5026
 
5004
- /* "wepoll/_wepoll.pyx":451
5027
+ /* "wepoll/_wepoll.pyx":464
5005
5028
  * raise
5006
5029
  *
5007
5030
  * cpdef uintptr_t fileno(self): # <<<<<<<<<<<<<<
@@ -5019,7 +5042,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
5019
5042
  static uintptr_t __pyx_f_6wepoll_7_wepoll_5epoll_fileno(struct __pyx_obj_6wepoll_7_wepoll_epoll *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) {
5020
5043
  uintptr_t __pyx_r;
5021
5044
 
5022
- /* "wepoll/_wepoll.pyx":455
5045
+ /* "wepoll/_wepoll.pyx":468
5023
5046
  * on windows this recasts the handle to a `uintptr_t` to a
5024
5047
  * PyLongObject (int)."""
5025
5048
  * return <uintptr_t>self.handle # <<<<<<<<<<<<<<
@@ -5029,7 +5052,7 @@ static uintptr_t __pyx_f_6wepoll_7_wepoll_5epoll_fileno(struct __pyx_obj_6wepoll
5029
5052
  __pyx_r = ((uintptr_t)__pyx_v_self->handle);
5030
5053
  goto __pyx_L0;
5031
5054
 
5032
- /* "wepoll/_wepoll.pyx":451
5055
+ /* "wepoll/_wepoll.pyx":464
5033
5056
  * raise
5034
5057
  *
5035
5058
  * cpdef uintptr_t fileno(self): # <<<<<<<<<<<<<<
@@ -5095,8 +5118,8 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_2fileno(struct __pyx_obj_6wepo
5095
5118
  int __pyx_clineno = 0;
5096
5119
  __Pyx_RefNannySetupContext("fileno", 0);
5097
5120
  __Pyx_XDECREF(__pyx_r);
5098
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_fileno(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 451, __pyx_L1_error)
5099
- __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
5121
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_fileno(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 464, __pyx_L1_error)
5122
+ __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
5100
5123
  __Pyx_GOTREF(__pyx_t_2);
5101
5124
  __pyx_r = __pyx_t_2;
5102
5125
  __pyx_t_2 = 0;
@@ -5113,7 +5136,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_2fileno(struct __pyx_obj_6wepo
5113
5136
  return __pyx_r;
5114
5137
  }
5115
5138
 
5116
- /* "wepoll/_wepoll.pyx":458
5139
+ /* "wepoll/_wepoll.pyx":471
5117
5140
  *
5118
5141
  *
5119
5142
  * cpdef object close(self): # <<<<<<<<<<<<<<
@@ -5140,7 +5163,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_close(struct __pyx_obj_6wepoll_
5140
5163
  int __pyx_clineno = 0;
5141
5164
  __Pyx_RefNannySetupContext("close", 0);
5142
5165
 
5143
- /* "wepoll/_wepoll.pyx":465
5166
+ /* "wepoll/_wepoll.pyx":478
5144
5167
  * """
5145
5168
  * cdef int _errno
5146
5169
  * if not self.closed: # <<<<<<<<<<<<<<
@@ -5150,17 +5173,17 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_close(struct __pyx_obj_6wepoll_
5150
5173
  __pyx_t_1 = (!__pyx_v_self->closed);
5151
5174
  if (__pyx_t_1) {
5152
5175
 
5153
- /* "wepoll/_wepoll.pyx":466
5176
+ /* "wepoll/_wepoll.pyx":479
5154
5177
  * cdef int _errno
5155
5178
  * if not self.closed:
5156
5179
  * _errno = self._close() # <<<<<<<<<<<<<<
5157
5180
  * if _errno < 0:
5158
5181
  * wepoll_set_errno(_errno)
5159
5182
  */
5160
- __pyx_t_2 = __pyx_f_6wepoll_7_wepoll_5epoll__close(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 466, __pyx_L1_error)
5183
+ __pyx_t_2 = __pyx_f_6wepoll_7_wepoll_5epoll__close(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 479, __pyx_L1_error)
5161
5184
  __pyx_v__errno = __pyx_t_2;
5162
5185
 
5163
- /* "wepoll/_wepoll.pyx":467
5186
+ /* "wepoll/_wepoll.pyx":480
5164
5187
  * if not self.closed:
5165
5188
  * _errno = self._close()
5166
5189
  * if _errno < 0: # <<<<<<<<<<<<<<
@@ -5170,7 +5193,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_close(struct __pyx_obj_6wepoll_
5170
5193
  __pyx_t_1 = (__pyx_v__errno < 0);
5171
5194
  if (unlikely(__pyx_t_1)) {
5172
5195
 
5173
- /* "wepoll/_wepoll.pyx":468
5196
+ /* "wepoll/_wepoll.pyx":481
5174
5197
  * _errno = self._close()
5175
5198
  * if _errno < 0:
5176
5199
  * wepoll_set_errno(_errno) # <<<<<<<<<<<<<<
@@ -5179,16 +5202,16 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_close(struct __pyx_obj_6wepoll_
5179
5202
  */
5180
5203
  wepoll_set_errno(__pyx_v__errno);
5181
5204
 
5182
- /* "wepoll/_wepoll.pyx":469
5205
+ /* "wepoll/_wepoll.pyx":482
5183
5206
  * if _errno < 0:
5184
5207
  * wepoll_set_errno(_errno)
5185
5208
  * PyErr_SetFromErrno(OSError) # <<<<<<<<<<<<<<
5186
5209
  * raise
5187
5210
  * self.closed = True
5188
5211
  */
5189
- __pyx_t_3 = PyErr_SetFromErrno(__pyx_builtin_OSError); if (unlikely(__pyx_t_3 == ((PyObject *)0))) __PYX_ERR(0, 469, __pyx_L1_error)
5212
+ __pyx_t_3 = PyErr_SetFromErrno(__pyx_builtin_OSError); if (unlikely(__pyx_t_3 == ((PyObject *)0))) __PYX_ERR(0, 482, __pyx_L1_error)
5190
5213
 
5191
- /* "wepoll/_wepoll.pyx":470
5214
+ /* "wepoll/_wepoll.pyx":483
5192
5215
  * wepoll_set_errno(_errno)
5193
5216
  * PyErr_SetFromErrno(OSError)
5194
5217
  * raise # <<<<<<<<<<<<<<
@@ -5196,9 +5219,9 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_close(struct __pyx_obj_6wepoll_
5196
5219
  *
5197
5220
  */
5198
5221
  __Pyx_ReraiseException();
5199
- __PYX_ERR(0, 470, __pyx_L1_error)
5222
+ __PYX_ERR(0, 483, __pyx_L1_error)
5200
5223
 
5201
- /* "wepoll/_wepoll.pyx":467
5224
+ /* "wepoll/_wepoll.pyx":480
5202
5225
  * if not self.closed:
5203
5226
  * _errno = self._close()
5204
5227
  * if _errno < 0: # <<<<<<<<<<<<<<
@@ -5207,7 +5230,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_close(struct __pyx_obj_6wepoll_
5207
5230
  */
5208
5231
  }
5209
5232
 
5210
- /* "wepoll/_wepoll.pyx":471
5233
+ /* "wepoll/_wepoll.pyx":484
5211
5234
  * PyErr_SetFromErrno(OSError)
5212
5235
  * raise
5213
5236
  * self.closed = True # <<<<<<<<<<<<<<
@@ -5216,7 +5239,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_close(struct __pyx_obj_6wepoll_
5216
5239
  */
5217
5240
  __pyx_v_self->closed = 1;
5218
5241
 
5219
- /* "wepoll/_wepoll.pyx":465
5242
+ /* "wepoll/_wepoll.pyx":478
5220
5243
  * """
5221
5244
  * cdef int _errno
5222
5245
  * if not self.closed: # <<<<<<<<<<<<<<
@@ -5225,7 +5248,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_close(struct __pyx_obj_6wepoll_
5225
5248
  */
5226
5249
  }
5227
5250
 
5228
- /* "wepoll/_wepoll.pyx":458
5251
+ /* "wepoll/_wepoll.pyx":471
5229
5252
  *
5230
5253
  *
5231
5254
  * cpdef object close(self): # <<<<<<<<<<<<<<
@@ -5297,7 +5320,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_4close(struct __pyx_obj_6wepol
5297
5320
  int __pyx_clineno = 0;
5298
5321
  __Pyx_RefNannySetupContext("close", 0);
5299
5322
  __Pyx_XDECREF(__pyx_r);
5300
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_close(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
5323
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_close(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
5301
5324
  __Pyx_GOTREF(__pyx_t_1);
5302
5325
  __pyx_r = __pyx_t_1;
5303
5326
  __pyx_t_1 = 0;
@@ -5314,7 +5337,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_4close(struct __pyx_obj_6wepol
5314
5337
  return __pyx_r;
5315
5338
  }
5316
5339
 
5317
- /* "wepoll/_wepoll.pyx":473
5340
+ /* "wepoll/_wepoll.pyx":486
5318
5341
  * self.closed = True
5319
5342
  *
5320
5343
  * cpdef object register(self, object fd, unsigned int eventmask): # <<<<<<<<<<<<<<
@@ -5342,28 +5365,28 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_register(struct __pyx_obj_6wepo
5342
5365
  int __pyx_clineno = 0;
5343
5366
  __Pyx_RefNannySetupContext("register", 0);
5344
5367
 
5345
- /* "wepoll/_wepoll.pyx":477
5368
+ /* "wepoll/_wepoll.pyx":490
5346
5369
  * cdef SOCKET _fd
5347
5370
  *
5348
5371
  * if self._pools_closed() < 0: # <<<<<<<<<<<<<<
5349
5372
  * raise
5350
5373
  *
5351
5374
  */
5352
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 477, __pyx_L1_error)
5375
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 490, __pyx_L1_error)
5353
5376
  __pyx_t_2 = (__pyx_t_1 < 0);
5354
5377
  if (unlikely(__pyx_t_2)) {
5355
5378
 
5356
- /* "wepoll/_wepoll.pyx":478
5379
+ /* "wepoll/_wepoll.pyx":491
5357
5380
  *
5358
5381
  * if self._pools_closed() < 0:
5359
5382
  * raise # <<<<<<<<<<<<<<
5360
5383
  *
5361
- * _fd = fd_from_object(fd)
5384
+ * _fd = self._fd_from_object(fd)
5362
5385
  */
5363
5386
  __Pyx_ReraiseException();
5364
- __PYX_ERR(0, 478, __pyx_L1_error)
5387
+ __PYX_ERR(0, 491, __pyx_L1_error)
5365
5388
 
5366
- /* "wepoll/_wepoll.pyx":477
5389
+ /* "wepoll/_wepoll.pyx":490
5367
5390
  * cdef SOCKET _fd
5368
5391
  *
5369
5392
  * if self._pools_closed() < 0: # <<<<<<<<<<<<<<
@@ -5372,27 +5395,27 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_register(struct __pyx_obj_6wepo
5372
5395
  */
5373
5396
  }
5374
5397
 
5375
- /* "wepoll/_wepoll.pyx":480
5398
+ /* "wepoll/_wepoll.pyx":493
5376
5399
  * raise
5377
5400
  *
5378
- * _fd = fd_from_object(fd) # <<<<<<<<<<<<<<
5401
+ * _fd = self._fd_from_object(fd) # <<<<<<<<<<<<<<
5379
5402
  * ev.events = eventmask
5380
5403
  * ev.data.sock = _fd
5381
5404
  */
5382
- __pyx_t_3 = __pyx_f_6wepoll_7_wepoll_fd_from_object(__pyx_v_fd); if (unlikely(__pyx_t_3 == ((SOCKET)-1))) __PYX_ERR(0, 480, __pyx_L1_error)
5405
+ __pyx_t_3 = __pyx_f_6wepoll_7_wepoll_5epoll__fd_from_object(__pyx_v_self, __pyx_v_fd); if (unlikely(__pyx_t_3 == ((SOCKET)-1))) __PYX_ERR(0, 493, __pyx_L1_error)
5383
5406
  __pyx_v__fd = __pyx_t_3;
5384
5407
 
5385
- /* "wepoll/_wepoll.pyx":481
5408
+ /* "wepoll/_wepoll.pyx":494
5386
5409
  *
5387
- * _fd = fd_from_object(fd)
5410
+ * _fd = self._fd_from_object(fd)
5388
5411
  * ev.events = eventmask # <<<<<<<<<<<<<<
5389
5412
  * ev.data.sock = _fd
5390
5413
  * if self._ctl(EPOLL_CTL_ADD, _fd, &ev) < 0:
5391
5414
  */
5392
5415
  __pyx_v_ev.events = __pyx_v_eventmask;
5393
5416
 
5394
- /* "wepoll/_wepoll.pyx":482
5395
- * _fd = fd_from_object(fd)
5417
+ /* "wepoll/_wepoll.pyx":495
5418
+ * _fd = self._fd_from_object(fd)
5396
5419
  * ev.events = eventmask
5397
5420
  * ev.data.sock = _fd # <<<<<<<<<<<<<<
5398
5421
  * if self._ctl(EPOLL_CTL_ADD, _fd, &ev) < 0:
@@ -5400,18 +5423,18 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_register(struct __pyx_obj_6wepo
5400
5423
  */
5401
5424
  __pyx_v_ev.data.sock = __pyx_v__fd;
5402
5425
 
5403
- /* "wepoll/_wepoll.pyx":483
5426
+ /* "wepoll/_wepoll.pyx":496
5404
5427
  * ev.events = eventmask
5405
5428
  * ev.data.sock = _fd
5406
5429
  * if self._ctl(EPOLL_CTL_ADD, _fd, &ev) < 0: # <<<<<<<<<<<<<<
5407
5430
  * raise
5408
5431
  *
5409
5432
  */
5410
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__ctl(__pyx_v_self, EPOLL_CTL_ADD, __pyx_v__fd, (&__pyx_v_ev)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 483, __pyx_L1_error)
5433
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__ctl(__pyx_v_self, EPOLL_CTL_ADD, __pyx_v__fd, (&__pyx_v_ev)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 496, __pyx_L1_error)
5411
5434
  __pyx_t_2 = (__pyx_t_1 < 0);
5412
5435
  if (unlikely(__pyx_t_2)) {
5413
5436
 
5414
- /* "wepoll/_wepoll.pyx":484
5437
+ /* "wepoll/_wepoll.pyx":497
5415
5438
  * ev.data.sock = _fd
5416
5439
  * if self._ctl(EPOLL_CTL_ADD, _fd, &ev) < 0:
5417
5440
  * raise # <<<<<<<<<<<<<<
@@ -5419,9 +5442,9 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_register(struct __pyx_obj_6wepo
5419
5442
  * cpdef object modify(self, object fd, unsigned int eventmask):
5420
5443
  */
5421
5444
  __Pyx_ReraiseException();
5422
- __PYX_ERR(0, 484, __pyx_L1_error)
5445
+ __PYX_ERR(0, 497, __pyx_L1_error)
5423
5446
 
5424
- /* "wepoll/_wepoll.pyx":483
5447
+ /* "wepoll/_wepoll.pyx":496
5425
5448
  * ev.events = eventmask
5426
5449
  * ev.data.sock = _fd
5427
5450
  * if self._ctl(EPOLL_CTL_ADD, _fd, &ev) < 0: # <<<<<<<<<<<<<<
@@ -5430,7 +5453,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_register(struct __pyx_obj_6wepo
5430
5453
  */
5431
5454
  }
5432
5455
 
5433
- /* "wepoll/_wepoll.pyx":473
5456
+ /* "wepoll/_wepoll.pyx":486
5434
5457
  * self.closed = True
5435
5458
  *
5436
5459
  * cpdef object register(self, object fd, unsigned int eventmask): # <<<<<<<<<<<<<<
@@ -5490,39 +5513,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
5490
5513
  {
5491
5514
  PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fd,&__pyx_mstate_global->__pyx_n_u_eventmask,0};
5492
5515
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
5493
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 473, __pyx_L3_error)
5516
+ if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 486, __pyx_L3_error)
5494
5517
  if (__pyx_kwds_len > 0) {
5495
5518
  switch (__pyx_nargs) {
5496
5519
  case 2:
5497
5520
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5498
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 473, __pyx_L3_error)
5521
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 486, __pyx_L3_error)
5499
5522
  CYTHON_FALLTHROUGH;
5500
5523
  case 1:
5501
5524
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5502
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 473, __pyx_L3_error)
5525
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 486, __pyx_L3_error)
5503
5526
  CYTHON_FALLTHROUGH;
5504
5527
  case 0: break;
5505
5528
  default: goto __pyx_L5_argtuple_error;
5506
5529
  }
5507
5530
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
5508
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "register", 0) < 0) __PYX_ERR(0, 473, __pyx_L3_error)
5531
+ if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "register", 0) < 0) __PYX_ERR(0, 486, __pyx_L3_error)
5509
5532
  for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
5510
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, i); __PYX_ERR(0, 473, __pyx_L3_error) }
5533
+ if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, i); __PYX_ERR(0, 486, __pyx_L3_error) }
5511
5534
  }
5512
5535
  } else if (unlikely(__pyx_nargs != 2)) {
5513
5536
  goto __pyx_L5_argtuple_error;
5514
5537
  } else {
5515
5538
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5516
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 473, __pyx_L3_error)
5539
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 486, __pyx_L3_error)
5517
5540
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5518
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 473, __pyx_L3_error)
5541
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 486, __pyx_L3_error)
5519
5542
  }
5520
5543
  __pyx_v_fd = values[0];
5521
- __pyx_v_eventmask = __Pyx_PyLong_As_unsigned_int(values[1]); if (unlikely((__pyx_v_eventmask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L3_error)
5544
+ __pyx_v_eventmask = __Pyx_PyLong_As_unsigned_int(values[1]); if (unlikely((__pyx_v_eventmask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 486, __pyx_L3_error)
5522
5545
  }
5523
5546
  goto __pyx_L6_skip;
5524
5547
  __pyx_L5_argtuple_error:;
5525
- __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 473, __pyx_L3_error)
5548
+ __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 486, __pyx_L3_error)
5526
5549
  __pyx_L6_skip:;
5527
5550
  goto __pyx_L4_argument_unpacking_done;
5528
5551
  __pyx_L3_error:;
@@ -5552,7 +5575,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_6register(struct __pyx_obj_6we
5552
5575
  int __pyx_clineno = 0;
5553
5576
  __Pyx_RefNannySetupContext("register", 0);
5554
5577
  __Pyx_XDECREF(__pyx_r);
5555
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_register(__pyx_v_self, __pyx_v_fd, __pyx_v_eventmask, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
5578
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_register(__pyx_v_self, __pyx_v_fd, __pyx_v_eventmask, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
5556
5579
  __Pyx_GOTREF(__pyx_t_1);
5557
5580
  __pyx_r = __pyx_t_1;
5558
5581
  __pyx_t_1 = 0;
@@ -5569,7 +5592,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_6register(struct __pyx_obj_6we
5569
5592
  return __pyx_r;
5570
5593
  }
5571
5594
 
5572
- /* "wepoll/_wepoll.pyx":486
5595
+ /* "wepoll/_wepoll.pyx":499
5573
5596
  * raise
5574
5597
  *
5575
5598
  * cpdef object modify(self, object fd, unsigned int eventmask): # <<<<<<<<<<<<<<
@@ -5597,57 +5620,57 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_modify(struct __pyx_obj_6wepoll
5597
5620
  int __pyx_clineno = 0;
5598
5621
  __Pyx_RefNannySetupContext("modify", 0);
5599
5622
 
5600
- /* "wepoll/_wepoll.pyx":505
5623
+ /* "wepoll/_wepoll.pyx":518
5601
5624
  * cdef SOCKET _fd
5602
5625
  *
5603
5626
  * if self._pools_closed() < 0: # <<<<<<<<<<<<<<
5604
5627
  * raise
5605
- * _fd = fd_from_object(fd)
5628
+ * _fd = self._fd_from_object(fd)
5606
5629
  */
5607
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 505, __pyx_L1_error)
5630
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 518, __pyx_L1_error)
5608
5631
  __pyx_t_2 = (__pyx_t_1 < 0);
5609
5632
  if (unlikely(__pyx_t_2)) {
5610
5633
 
5611
- /* "wepoll/_wepoll.pyx":506
5634
+ /* "wepoll/_wepoll.pyx":519
5612
5635
  *
5613
5636
  * if self._pools_closed() < 0:
5614
5637
  * raise # <<<<<<<<<<<<<<
5615
- * _fd = fd_from_object(fd)
5638
+ * _fd = self._fd_from_object(fd)
5616
5639
  * ev.events = eventmask
5617
5640
  */
5618
5641
  __Pyx_ReraiseException();
5619
- __PYX_ERR(0, 506, __pyx_L1_error)
5642
+ __PYX_ERR(0, 519, __pyx_L1_error)
5620
5643
 
5621
- /* "wepoll/_wepoll.pyx":505
5644
+ /* "wepoll/_wepoll.pyx":518
5622
5645
  * cdef SOCKET _fd
5623
5646
  *
5624
5647
  * if self._pools_closed() < 0: # <<<<<<<<<<<<<<
5625
5648
  * raise
5626
- * _fd = fd_from_object(fd)
5649
+ * _fd = self._fd_from_object(fd)
5627
5650
  */
5628
5651
  }
5629
5652
 
5630
- /* "wepoll/_wepoll.pyx":507
5653
+ /* "wepoll/_wepoll.pyx":520
5631
5654
  * if self._pools_closed() < 0:
5632
5655
  * raise
5633
- * _fd = fd_from_object(fd) # <<<<<<<<<<<<<<
5656
+ * _fd = self._fd_from_object(fd) # <<<<<<<<<<<<<<
5634
5657
  * ev.events = eventmask
5635
5658
  * ev.data.sock = _fd
5636
5659
  */
5637
- __pyx_t_3 = __pyx_f_6wepoll_7_wepoll_fd_from_object(__pyx_v_fd); if (unlikely(__pyx_t_3 == ((SOCKET)-1))) __PYX_ERR(0, 507, __pyx_L1_error)
5660
+ __pyx_t_3 = __pyx_f_6wepoll_7_wepoll_5epoll__fd_from_object(__pyx_v_self, __pyx_v_fd); if (unlikely(__pyx_t_3 == ((SOCKET)-1))) __PYX_ERR(0, 520, __pyx_L1_error)
5638
5661
  __pyx_v__fd = __pyx_t_3;
5639
5662
 
5640
- /* "wepoll/_wepoll.pyx":508
5663
+ /* "wepoll/_wepoll.pyx":521
5641
5664
  * raise
5642
- * _fd = fd_from_object(fd)
5665
+ * _fd = self._fd_from_object(fd)
5643
5666
  * ev.events = eventmask # <<<<<<<<<<<<<<
5644
5667
  * ev.data.sock = _fd
5645
5668
  * if self._ctl(EPOLL_CTL_MOD, _fd, &ev) < 0:
5646
5669
  */
5647
5670
  __pyx_v_ev.events = __pyx_v_eventmask;
5648
5671
 
5649
- /* "wepoll/_wepoll.pyx":509
5650
- * _fd = fd_from_object(fd)
5672
+ /* "wepoll/_wepoll.pyx":522
5673
+ * _fd = self._fd_from_object(fd)
5651
5674
  * ev.events = eventmask
5652
5675
  * ev.data.sock = _fd # <<<<<<<<<<<<<<
5653
5676
  * if self._ctl(EPOLL_CTL_MOD, _fd, &ev) < 0:
@@ -5655,18 +5678,18 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_modify(struct __pyx_obj_6wepoll
5655
5678
  */
5656
5679
  __pyx_v_ev.data.sock = __pyx_v__fd;
5657
5680
 
5658
- /* "wepoll/_wepoll.pyx":510
5681
+ /* "wepoll/_wepoll.pyx":523
5659
5682
  * ev.events = eventmask
5660
5683
  * ev.data.sock = _fd
5661
5684
  * if self._ctl(EPOLL_CTL_MOD, _fd, &ev) < 0: # <<<<<<<<<<<<<<
5662
5685
  * raise
5663
5686
  *
5664
5687
  */
5665
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__ctl(__pyx_v_self, EPOLL_CTL_MOD, __pyx_v__fd, (&__pyx_v_ev)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 510, __pyx_L1_error)
5688
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__ctl(__pyx_v_self, EPOLL_CTL_MOD, __pyx_v__fd, (&__pyx_v_ev)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 523, __pyx_L1_error)
5666
5689
  __pyx_t_2 = (__pyx_t_1 < 0);
5667
5690
  if (unlikely(__pyx_t_2)) {
5668
5691
 
5669
- /* "wepoll/_wepoll.pyx":511
5692
+ /* "wepoll/_wepoll.pyx":524
5670
5693
  * ev.data.sock = _fd
5671
5694
  * if self._ctl(EPOLL_CTL_MOD, _fd, &ev) < 0:
5672
5695
  * raise # <<<<<<<<<<<<<<
@@ -5674,9 +5697,9 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_modify(struct __pyx_obj_6wepoll
5674
5697
  * cpdef object unregister(self, object fd):
5675
5698
  */
5676
5699
  __Pyx_ReraiseException();
5677
- __PYX_ERR(0, 511, __pyx_L1_error)
5700
+ __PYX_ERR(0, 524, __pyx_L1_error)
5678
5701
 
5679
- /* "wepoll/_wepoll.pyx":510
5702
+ /* "wepoll/_wepoll.pyx":523
5680
5703
  * ev.events = eventmask
5681
5704
  * ev.data.sock = _fd
5682
5705
  * if self._ctl(EPOLL_CTL_MOD, _fd, &ev) < 0: # <<<<<<<<<<<<<<
@@ -5685,7 +5708,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_modify(struct __pyx_obj_6wepoll
5685
5708
  */
5686
5709
  }
5687
5710
 
5688
- /* "wepoll/_wepoll.pyx":486
5711
+ /* "wepoll/_wepoll.pyx":499
5689
5712
  * raise
5690
5713
  *
5691
5714
  * cpdef object modify(self, object fd, unsigned int eventmask): # <<<<<<<<<<<<<<
@@ -5746,39 +5769,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
5746
5769
  {
5747
5770
  PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fd,&__pyx_mstate_global->__pyx_n_u_eventmask,0};
5748
5771
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
5749
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 486, __pyx_L3_error)
5772
+ if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 499, __pyx_L3_error)
5750
5773
  if (__pyx_kwds_len > 0) {
5751
5774
  switch (__pyx_nargs) {
5752
5775
  case 2:
5753
5776
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5754
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 486, __pyx_L3_error)
5777
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 499, __pyx_L3_error)
5755
5778
  CYTHON_FALLTHROUGH;
5756
5779
  case 1:
5757
5780
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5758
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 486, __pyx_L3_error)
5781
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 499, __pyx_L3_error)
5759
5782
  CYTHON_FALLTHROUGH;
5760
5783
  case 0: break;
5761
5784
  default: goto __pyx_L5_argtuple_error;
5762
5785
  }
5763
5786
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
5764
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "modify", 0) < 0) __PYX_ERR(0, 486, __pyx_L3_error)
5787
+ if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "modify", 0) < 0) __PYX_ERR(0, 499, __pyx_L3_error)
5765
5788
  for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
5766
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("modify", 1, 2, 2, i); __PYX_ERR(0, 486, __pyx_L3_error) }
5789
+ if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("modify", 1, 2, 2, i); __PYX_ERR(0, 499, __pyx_L3_error) }
5767
5790
  }
5768
5791
  } else if (unlikely(__pyx_nargs != 2)) {
5769
5792
  goto __pyx_L5_argtuple_error;
5770
5793
  } else {
5771
5794
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5772
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 486, __pyx_L3_error)
5795
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 499, __pyx_L3_error)
5773
5796
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5774
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 486, __pyx_L3_error)
5797
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 499, __pyx_L3_error)
5775
5798
  }
5776
5799
  __pyx_v_fd = values[0];
5777
- __pyx_v_eventmask = __Pyx_PyLong_As_unsigned_int(values[1]); if (unlikely((__pyx_v_eventmask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 486, __pyx_L3_error)
5800
+ __pyx_v_eventmask = __Pyx_PyLong_As_unsigned_int(values[1]); if (unlikely((__pyx_v_eventmask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L3_error)
5778
5801
  }
5779
5802
  goto __pyx_L6_skip;
5780
5803
  __pyx_L5_argtuple_error:;
5781
- __Pyx_RaiseArgtupleInvalid("modify", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 486, __pyx_L3_error)
5804
+ __Pyx_RaiseArgtupleInvalid("modify", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 499, __pyx_L3_error)
5782
5805
  __pyx_L6_skip:;
5783
5806
  goto __pyx_L4_argument_unpacking_done;
5784
5807
  __pyx_L3_error:;
@@ -5808,7 +5831,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_8modify(struct __pyx_obj_6wepo
5808
5831
  int __pyx_clineno = 0;
5809
5832
  __Pyx_RefNannySetupContext("modify", 0);
5810
5833
  __Pyx_XDECREF(__pyx_r);
5811
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_modify(__pyx_v_self, __pyx_v_fd, __pyx_v_eventmask, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
5834
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_modify(__pyx_v_self, __pyx_v_fd, __pyx_v_eventmask, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
5812
5835
  __Pyx_GOTREF(__pyx_t_1);
5813
5836
  __pyx_r = __pyx_t_1;
5814
5837
  __pyx_t_1 = 0;
@@ -5825,7 +5848,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_8modify(struct __pyx_obj_6wepo
5825
5848
  return __pyx_r;
5826
5849
  }
5827
5850
 
5828
- /* "wepoll/_wepoll.pyx":513
5851
+ /* "wepoll/_wepoll.pyx":526
5829
5852
  * raise
5830
5853
  *
5831
5854
  * cpdef object unregister(self, object fd): # <<<<<<<<<<<<<<
@@ -5853,28 +5876,28 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_unregister(struct __pyx_obj_6we
5853
5876
  int __pyx_clineno = 0;
5854
5877
  __Pyx_RefNannySetupContext("unregister", 0);
5855
5878
 
5856
- /* "wepoll/_wepoll.pyx":531
5879
+ /* "wepoll/_wepoll.pyx":544
5857
5880
  * cdef int result
5858
5881
  *
5859
5882
  * if self._pools_closed() < 0: # <<<<<<<<<<<<<<
5860
5883
  * raise
5861
5884
  *
5862
5885
  */
5863
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 531, __pyx_L1_error)
5886
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__pools_closed(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 544, __pyx_L1_error)
5864
5887
  __pyx_t_2 = (__pyx_t_1 < 0);
5865
5888
  if (unlikely(__pyx_t_2)) {
5866
5889
 
5867
- /* "wepoll/_wepoll.pyx":532
5890
+ /* "wepoll/_wepoll.pyx":545
5868
5891
  *
5869
5892
  * if self._pools_closed() < 0:
5870
5893
  * raise # <<<<<<<<<<<<<<
5871
5894
  *
5872
- * _fd = fd_from_object(fd)
5895
+ * _fd = self._fd_from_object(fd)
5873
5896
  */
5874
5897
  __Pyx_ReraiseException();
5875
- __PYX_ERR(0, 532, __pyx_L1_error)
5898
+ __PYX_ERR(0, 545, __pyx_L1_error)
5876
5899
 
5877
- /* "wepoll/_wepoll.pyx":531
5900
+ /* "wepoll/_wepoll.pyx":544
5878
5901
  * cdef int result
5879
5902
  *
5880
5903
  * if self._pools_closed() < 0: # <<<<<<<<<<<<<<
@@ -5883,47 +5906,47 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_unregister(struct __pyx_obj_6we
5883
5906
  */
5884
5907
  }
5885
5908
 
5886
- /* "wepoll/_wepoll.pyx":534
5909
+ /* "wepoll/_wepoll.pyx":547
5887
5910
  * raise
5888
5911
  *
5889
- * _fd = fd_from_object(fd) # <<<<<<<<<<<<<<
5912
+ * _fd = self._fd_from_object(fd) # <<<<<<<<<<<<<<
5890
5913
  * if self._ctl(EPOLL_CTL_DEL, _fd, &ev) < 0:
5891
5914
  * raise
5892
5915
  */
5893
- __pyx_t_3 = __pyx_f_6wepoll_7_wepoll_fd_from_object(__pyx_v_fd); if (unlikely(__pyx_t_3 == ((SOCKET)-1))) __PYX_ERR(0, 534, __pyx_L1_error)
5916
+ __pyx_t_3 = __pyx_f_6wepoll_7_wepoll_5epoll__fd_from_object(__pyx_v_self, __pyx_v_fd); if (unlikely(__pyx_t_3 == ((SOCKET)-1))) __PYX_ERR(0, 547, __pyx_L1_error)
5894
5917
  __pyx_v__fd = __pyx_t_3;
5895
5918
 
5896
- /* "wepoll/_wepoll.pyx":535
5919
+ /* "wepoll/_wepoll.pyx":548
5897
5920
  *
5898
- * _fd = fd_from_object(fd)
5921
+ * _fd = self._fd_from_object(fd)
5899
5922
  * if self._ctl(EPOLL_CTL_DEL, _fd, &ev) < 0: # <<<<<<<<<<<<<<
5900
5923
  * raise
5901
5924
  *
5902
5925
  */
5903
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__ctl(__pyx_v_self, EPOLL_CTL_DEL, __pyx_v__fd, (&__pyx_v_ev)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 535, __pyx_L1_error)
5926
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll__ctl(__pyx_v_self, EPOLL_CTL_DEL, __pyx_v__fd, (&__pyx_v_ev)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 548, __pyx_L1_error)
5904
5927
  __pyx_t_2 = (__pyx_t_1 < 0);
5905
5928
  if (unlikely(__pyx_t_2)) {
5906
5929
 
5907
- /* "wepoll/_wepoll.pyx":536
5908
- * _fd = fd_from_object(fd)
5930
+ /* "wepoll/_wepoll.pyx":549
5931
+ * _fd = self._fd_from_object(fd)
5909
5932
  * if self._ctl(EPOLL_CTL_DEL, _fd, &ev) < 0:
5910
5933
  * raise # <<<<<<<<<<<<<<
5911
5934
  *
5912
5935
  * cpdef list poll(self, object timeout = None, int maxevents = -1):
5913
5936
  */
5914
5937
  __Pyx_ReraiseException();
5915
- __PYX_ERR(0, 536, __pyx_L1_error)
5938
+ __PYX_ERR(0, 549, __pyx_L1_error)
5916
5939
 
5917
- /* "wepoll/_wepoll.pyx":535
5940
+ /* "wepoll/_wepoll.pyx":548
5918
5941
  *
5919
- * _fd = fd_from_object(fd)
5942
+ * _fd = self._fd_from_object(fd)
5920
5943
  * if self._ctl(EPOLL_CTL_DEL, _fd, &ev) < 0: # <<<<<<<<<<<<<<
5921
5944
  * raise
5922
5945
  *
5923
5946
  */
5924
5947
  }
5925
5948
 
5926
- /* "wepoll/_wepoll.pyx":513
5949
+ /* "wepoll/_wepoll.pyx":526
5927
5950
  * raise
5928
5951
  *
5929
5952
  * cpdef object unregister(self, object fd): # <<<<<<<<<<<<<<
@@ -5983,32 +6006,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
5983
6006
  {
5984
6007
  PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fd,0};
5985
6008
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
5986
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 513, __pyx_L3_error)
6009
+ if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 526, __pyx_L3_error)
5987
6010
  if (__pyx_kwds_len > 0) {
5988
6011
  switch (__pyx_nargs) {
5989
6012
  case 1:
5990
6013
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5991
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 513, __pyx_L3_error)
6014
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 526, __pyx_L3_error)
5992
6015
  CYTHON_FALLTHROUGH;
5993
6016
  case 0: break;
5994
6017
  default: goto __pyx_L5_argtuple_error;
5995
6018
  }
5996
6019
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
5997
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unregister", 0) < 0) __PYX_ERR(0, 513, __pyx_L3_error)
6020
+ if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unregister", 0) < 0) __PYX_ERR(0, 526, __pyx_L3_error)
5998
6021
  for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
5999
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unregister", 1, 1, 1, i); __PYX_ERR(0, 513, __pyx_L3_error) }
6022
+ if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unregister", 1, 1, 1, i); __PYX_ERR(0, 526, __pyx_L3_error) }
6000
6023
  }
6001
6024
  } else if (unlikely(__pyx_nargs != 1)) {
6002
6025
  goto __pyx_L5_argtuple_error;
6003
6026
  } else {
6004
6027
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6005
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 513, __pyx_L3_error)
6028
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 526, __pyx_L3_error)
6006
6029
  }
6007
6030
  __pyx_v_fd = values[0];
6008
6031
  }
6009
6032
  goto __pyx_L6_skip;
6010
6033
  __pyx_L5_argtuple_error:;
6011
- __Pyx_RaiseArgtupleInvalid("unregister", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 513, __pyx_L3_error)
6034
+ __Pyx_RaiseArgtupleInvalid("unregister", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 526, __pyx_L3_error)
6012
6035
  __pyx_L6_skip:;
6013
6036
  goto __pyx_L4_argument_unpacking_done;
6014
6037
  __pyx_L3_error:;
@@ -6038,7 +6061,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_10unregister(struct __pyx_obj_
6038
6061
  int __pyx_clineno = 0;
6039
6062
  __Pyx_RefNannySetupContext("unregister", 0);
6040
6063
  __Pyx_XDECREF(__pyx_r);
6041
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_unregister(__pyx_v_self, __pyx_v_fd, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
6064
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_unregister(__pyx_v_self, __pyx_v_fd, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
6042
6065
  __Pyx_GOTREF(__pyx_t_1);
6043
6066
  __pyx_r = __pyx_t_1;
6044
6067
  __pyx_t_1 = 0;
@@ -6055,7 +6078,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_10unregister(struct __pyx_obj_
6055
6078
  return __pyx_r;
6056
6079
  }
6057
6080
 
6058
- /* "wepoll/_wepoll.pyx":538
6081
+ /* "wepoll/_wepoll.pyx":551
6059
6082
  * raise
6060
6083
  *
6061
6084
  * cpdef list poll(self, object timeout = None, int maxevents = -1): # <<<<<<<<<<<<<<
@@ -6112,7 +6135,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6112
6135
  }
6113
6136
  __Pyx_INCREF(__pyx_v_timeout);
6114
6137
 
6115
- /* "wepoll/_wepoll.pyx":555
6138
+ /* "wepoll/_wepoll.pyx":568
6116
6139
  * """
6117
6140
  * cdef PyTime_t _timeout, deadline, ms
6118
6141
  * cdef epoll_event *evs = NULL # <<<<<<<<<<<<<<
@@ -6121,7 +6144,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6121
6144
  */
6122
6145
  __pyx_v_evs = NULL;
6123
6146
 
6124
- /* "wepoll/_wepoll.pyx":558
6147
+ /* "wepoll/_wepoll.pyx":571
6125
6148
  * cdef int nfds, i
6126
6149
  * cdef list elist
6127
6150
  * cdef void* handle = self.handle # <<<<<<<<<<<<<<
@@ -6131,7 +6154,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6131
6154
  __pyx_t_1 = __pyx_v_self->handle;
6132
6155
  __pyx_v_handle = __pyx_t_1;
6133
6156
 
6134
- /* "wepoll/_wepoll.pyx":560
6157
+ /* "wepoll/_wepoll.pyx":573
6135
6158
  * cdef void* handle = self.handle
6136
6159
  *
6137
6160
  * _timeout = deadline = -1 # <<<<<<<<<<<<<<
@@ -6141,7 +6164,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6141
6164
  __pyx_v__timeout = -1L;
6142
6165
  __pyx_v_deadline = -1L;
6143
6166
 
6144
- /* "wepoll/_wepoll.pyx":561
6167
+ /* "wepoll/_wepoll.pyx":574
6145
6168
  *
6146
6169
  * _timeout = deadline = -1
6147
6170
  * nfds = 0 # <<<<<<<<<<<<<<
@@ -6150,7 +6173,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6150
6173
  */
6151
6174
  __pyx_v_nfds = 0;
6152
6175
 
6153
- /* "wepoll/_wepoll.pyx":562
6176
+ /* "wepoll/_wepoll.pyx":575
6154
6177
  * _timeout = deadline = -1
6155
6178
  * nfds = 0
6156
6179
  * if timeout is not None: # <<<<<<<<<<<<<<
@@ -6160,7 +6183,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6160
6183
  __pyx_t_2 = (__pyx_v_timeout != Py_None);
6161
6184
  if (__pyx_t_2) {
6162
6185
 
6163
- /* "wepoll/_wepoll.pyx":563
6186
+ /* "wepoll/_wepoll.pyx":576
6164
6187
  * nfds = 0
6165
6188
  * if timeout is not None:
6166
6189
  * if PyTime_FromSecondsObject(&_timeout, timeout, PyTime_ROUND_TIMEOUT) < 0: # <<<<<<<<<<<<<<
@@ -6170,7 +6193,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6170
6193
  __pyx_t_2 = (PyTime_FromSecondsObject((&__pyx_v__timeout), __pyx_v_timeout, __pyx_v_6wepoll_7_wepoll_PyTime_ROUND_TIMEOUT) < 0);
6171
6194
  if (unlikely(__pyx_t_2)) {
6172
6195
 
6173
- /* "wepoll/_wepoll.pyx":564
6196
+ /* "wepoll/_wepoll.pyx":577
6174
6197
  * if timeout is not None:
6175
6198
  * if PyTime_FromSecondsObject(&_timeout, timeout, PyTime_ROUND_TIMEOUT) < 0:
6176
6199
  * raise TypeError(f"{timeout!r} not supported") # <<<<<<<<<<<<<<
@@ -6180,9 +6203,9 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6180
6203
  __pyx_t_4 = NULL;
6181
6204
  __Pyx_INCREF(__pyx_builtin_TypeError);
6182
6205
  __pyx_t_5 = __pyx_builtin_TypeError;
6183
- __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_timeout), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error)
6206
+ __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_timeout), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 577, __pyx_L1_error)
6184
6207
  __Pyx_GOTREF(__pyx_t_6);
6185
- __pyx_t_7 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_not_supported); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 564, __pyx_L1_error)
6208
+ __pyx_t_7 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_not_supported); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 577, __pyx_L1_error)
6186
6209
  __Pyx_GOTREF(__pyx_t_7);
6187
6210
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6188
6211
  __pyx_t_8 = 1;
@@ -6192,14 +6215,14 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6192
6215
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6193
6216
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6194
6217
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6195
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
6218
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error)
6196
6219
  __Pyx_GOTREF(__pyx_t_3);
6197
6220
  }
6198
6221
  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6199
6222
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6200
- __PYX_ERR(0, 564, __pyx_L1_error)
6223
+ __PYX_ERR(0, 577, __pyx_L1_error)
6201
6224
 
6202
- /* "wepoll/_wepoll.pyx":563
6225
+ /* "wepoll/_wepoll.pyx":576
6203
6226
  * nfds = 0
6204
6227
  * if timeout is not None:
6205
6228
  * if PyTime_FromSecondsObject(&_timeout, timeout, PyTime_ROUND_TIMEOUT) < 0: # <<<<<<<<<<<<<<
@@ -6208,7 +6231,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6208
6231
  */
6209
6232
  }
6210
6233
 
6211
- /* "wepoll/_wepoll.pyx":569
6234
+ /* "wepoll/_wepoll.pyx":582
6212
6235
  * # Normal API So that we can mimic linux's python epoll system.
6213
6236
  *
6214
6237
  * ms = _PyTime_AsMilliseconds(_timeout, _PyTime_ROUND_CEILING) # <<<<<<<<<<<<<<
@@ -6217,7 +6240,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6217
6240
  */
6218
6241
  __pyx_v_ms = _PyTime_AsMilliseconds(__pyx_v__timeout, _PyTime_ROUND_CEILING);
6219
6242
 
6220
- /* "wepoll/_wepoll.pyx":570
6243
+ /* "wepoll/_wepoll.pyx":583
6221
6244
  *
6222
6245
  * ms = _PyTime_AsMilliseconds(_timeout, _PyTime_ROUND_CEILING)
6223
6246
  * if ms < INT_MIN or ms > INT_MAX: # <<<<<<<<<<<<<<
@@ -6235,7 +6258,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6235
6258
  __pyx_L6_bool_binop_done:;
6236
6259
  if (unlikely(__pyx_t_2)) {
6237
6260
 
6238
- /* "wepoll/_wepoll.pyx":571
6261
+ /* "wepoll/_wepoll.pyx":584
6239
6262
  * ms = _PyTime_AsMilliseconds(_timeout, _PyTime_ROUND_CEILING)
6240
6263
  * if ms < INT_MIN or ms > INT_MAX:
6241
6264
  * raise OverflowError("timeout is too large") # <<<<<<<<<<<<<<
@@ -6251,14 +6274,14 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6251
6274
  __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
6252
6275
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6253
6276
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6254
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error)
6277
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error)
6255
6278
  __Pyx_GOTREF(__pyx_t_3);
6256
6279
  }
6257
6280
  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6258
6281
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6259
- __PYX_ERR(0, 571, __pyx_L1_error)
6282
+ __PYX_ERR(0, 584, __pyx_L1_error)
6260
6283
 
6261
- /* "wepoll/_wepoll.pyx":570
6284
+ /* "wepoll/_wepoll.pyx":583
6262
6285
  *
6263
6286
  * ms = _PyTime_AsMilliseconds(_timeout, _PyTime_ROUND_CEILING)
6264
6287
  * if ms < INT_MIN or ms > INT_MAX: # <<<<<<<<<<<<<<
@@ -6267,7 +6290,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6267
6290
  */
6268
6291
  }
6269
6292
 
6270
- /* "wepoll/_wepoll.pyx":572
6293
+ /* "wepoll/_wepoll.pyx":585
6271
6294
  * if ms < INT_MIN or ms > INT_MAX:
6272
6295
  * raise OverflowError("timeout is too large")
6273
6296
  * if ms < 0: # <<<<<<<<<<<<<<
@@ -6277,7 +6300,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6277
6300
  __pyx_t_2 = (__pyx_v_ms < 0);
6278
6301
  if (__pyx_t_2) {
6279
6302
 
6280
- /* "wepoll/_wepoll.pyx":573
6303
+ /* "wepoll/_wepoll.pyx":586
6281
6304
  * raise OverflowError("timeout is too large")
6282
6305
  * if ms < 0:
6283
6306
  * ms = -1 # <<<<<<<<<<<<<<
@@ -6286,7 +6309,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6286
6309
  */
6287
6310
  __pyx_v_ms = -1L;
6288
6311
 
6289
- /* "wepoll/_wepoll.pyx":572
6312
+ /* "wepoll/_wepoll.pyx":585
6290
6313
  * if ms < INT_MIN or ms > INT_MAX:
6291
6314
  * raise OverflowError("timeout is too large")
6292
6315
  * if ms < 0: # <<<<<<<<<<<<<<
@@ -6295,7 +6318,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6295
6318
  */
6296
6319
  }
6297
6320
 
6298
- /* "wepoll/_wepoll.pyx":575
6321
+ /* "wepoll/_wepoll.pyx":588
6299
6322
  * ms = -1
6300
6323
  *
6301
6324
  * if _timeout >= 0: # <<<<<<<<<<<<<<
@@ -6305,7 +6328,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6305
6328
  __pyx_t_2 = (__pyx_v__timeout >= 0);
6306
6329
  if (__pyx_t_2) {
6307
6330
 
6308
- /* "wepoll/_wepoll.pyx":576
6331
+ /* "wepoll/_wepoll.pyx":589
6309
6332
  *
6310
6333
  * if _timeout >= 0:
6311
6334
  * deadline = PyTime_Add(monotonic_ns(), _timeout) # <<<<<<<<<<<<<<
@@ -6314,7 +6337,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6314
6337
  */
6315
6338
  __pyx_v_deadline = PyTime_Add(__pyx_f_7cpython_4time_monotonic_ns(), __pyx_v__timeout);
6316
6339
 
6317
- /* "wepoll/_wepoll.pyx":575
6340
+ /* "wepoll/_wepoll.pyx":588
6318
6341
  * ms = -1
6319
6342
  *
6320
6343
  * if _timeout >= 0: # <<<<<<<<<<<<<<
@@ -6323,7 +6346,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6323
6346
  */
6324
6347
  }
6325
6348
 
6326
- /* "wepoll/_wepoll.pyx":562
6349
+ /* "wepoll/_wepoll.pyx":575
6327
6350
  * _timeout = deadline = -1
6328
6351
  * nfds = 0
6329
6352
  * if timeout is not None: # <<<<<<<<<<<<<<
@@ -6332,7 +6355,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6332
6355
  */
6333
6356
  }
6334
6357
 
6335
- /* "wepoll/_wepoll.pyx":579
6358
+ /* "wepoll/_wepoll.pyx":592
6336
6359
  *
6337
6360
  *
6338
6361
  * if maxevents == -1: # <<<<<<<<<<<<<<
@@ -6342,7 +6365,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6342
6365
  __pyx_t_2 = (__pyx_v_maxevents == -1L);
6343
6366
  if (__pyx_t_2) {
6344
6367
 
6345
- /* "wepoll/_wepoll.pyx":580
6368
+ /* "wepoll/_wepoll.pyx":593
6346
6369
  *
6347
6370
  * if maxevents == -1:
6348
6371
  * maxevents = FD_SETSIZE - 1 # <<<<<<<<<<<<<<
@@ -6351,7 +6374,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6351
6374
  */
6352
6375
  __pyx_v_maxevents = 0x1ff;
6353
6376
 
6354
- /* "wepoll/_wepoll.pyx":579
6377
+ /* "wepoll/_wepoll.pyx":592
6355
6378
  *
6356
6379
  *
6357
6380
  * if maxevents == -1: # <<<<<<<<<<<<<<
@@ -6361,7 +6384,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6361
6384
  goto __pyx_L10;
6362
6385
  }
6363
6386
 
6364
- /* "wepoll/_wepoll.pyx":581
6387
+ /* "wepoll/_wepoll.pyx":594
6365
6388
  * if maxevents == -1:
6366
6389
  * maxevents = FD_SETSIZE - 1
6367
6390
  * elif maxevents < 1: # <<<<<<<<<<<<<<
@@ -6371,7 +6394,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6371
6394
  __pyx_t_2 = (__pyx_v_maxevents < 1);
6372
6395
  if (unlikely(__pyx_t_2)) {
6373
6396
 
6374
- /* "wepoll/_wepoll.pyx":582
6397
+ /* "wepoll/_wepoll.pyx":595
6375
6398
  * maxevents = FD_SETSIZE - 1
6376
6399
  * elif maxevents < 1:
6377
6400
  * raise ValueError(f"maxevents must be greater than 0, got {maxevents}") # <<<<<<<<<<<<<<
@@ -6381,9 +6404,9 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6381
6404
  __pyx_t_7 = NULL;
6382
6405
  __Pyx_INCREF(__pyx_builtin_ValueError);
6383
6406
  __pyx_t_5 = __pyx_builtin_ValueError;
6384
- __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_maxevents, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error)
6407
+ __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_maxevents, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error)
6385
6408
  __Pyx_GOTREF(__pyx_t_4);
6386
- __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_maxevents_must_be_greater_than_0, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 582, __pyx_L1_error)
6409
+ __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_maxevents_must_be_greater_than_0, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error)
6387
6410
  __Pyx_GOTREF(__pyx_t_6);
6388
6411
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6389
6412
  __pyx_t_8 = 1;
@@ -6393,14 +6416,14 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6393
6416
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6394
6417
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6395
6418
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6396
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L1_error)
6419
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
6397
6420
  __Pyx_GOTREF(__pyx_t_3);
6398
6421
  }
6399
6422
  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6400
6423
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6401
- __PYX_ERR(0, 582, __pyx_L1_error)
6424
+ __PYX_ERR(0, 595, __pyx_L1_error)
6402
6425
 
6403
- /* "wepoll/_wepoll.pyx":581
6426
+ /* "wepoll/_wepoll.pyx":594
6404
6427
  * if maxevents == -1:
6405
6428
  * maxevents = FD_SETSIZE - 1
6406
6429
  * elif maxevents < 1: # <<<<<<<<<<<<<<
@@ -6410,7 +6433,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6410
6433
  }
6411
6434
  __pyx_L10:;
6412
6435
 
6413
- /* "wepoll/_wepoll.pyx":584
6436
+ /* "wepoll/_wepoll.pyx":597
6414
6437
  * raise ValueError(f"maxevents must be greater than 0, got {maxevents}")
6415
6438
  *
6416
6439
  * evs = <epoll_event*>PyMem_Malloc(sizeof(epoll_event) * maxevents) # <<<<<<<<<<<<<<
@@ -6419,7 +6442,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6419
6442
  */
6420
6443
  __pyx_v_evs = ((struct epoll_event *)PyMem_Malloc(((sizeof(struct epoll_event)) * __pyx_v_maxevents)));
6421
6444
 
6422
- /* "wepoll/_wepoll.pyx":585
6445
+ /* "wepoll/_wepoll.pyx":598
6423
6446
  *
6424
6447
  * evs = <epoll_event*>PyMem_Malloc(sizeof(epoll_event) * maxevents)
6425
6448
  * if evs == NULL: # <<<<<<<<<<<<<<
@@ -6429,16 +6452,16 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6429
6452
  __pyx_t_2 = (__pyx_v_evs == NULL);
6430
6453
  if (unlikely(__pyx_t_2)) {
6431
6454
 
6432
- /* "wepoll/_wepoll.pyx":586
6455
+ /* "wepoll/_wepoll.pyx":599
6433
6456
  * evs = <epoll_event*>PyMem_Malloc(sizeof(epoll_event) * maxevents)
6434
6457
  * if evs == NULL:
6435
6458
  * raise MemoryError # <<<<<<<<<<<<<<
6436
6459
  *
6437
6460
  * while True:
6438
6461
  */
6439
- PyErr_NoMemory(); __PYX_ERR(0, 586, __pyx_L1_error)
6462
+ PyErr_NoMemory(); __PYX_ERR(0, 599, __pyx_L1_error)
6440
6463
 
6441
- /* "wepoll/_wepoll.pyx":585
6464
+ /* "wepoll/_wepoll.pyx":598
6442
6465
  *
6443
6466
  * evs = <epoll_event*>PyMem_Malloc(sizeof(epoll_event) * maxevents)
6444
6467
  * if evs == NULL: # <<<<<<<<<<<<<<
@@ -6447,7 +6470,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6447
6470
  */
6448
6471
  }
6449
6472
 
6450
- /* "wepoll/_wepoll.pyx":588
6473
+ /* "wepoll/_wepoll.pyx":601
6451
6474
  * raise MemoryError
6452
6475
  *
6453
6476
  * while True: # <<<<<<<<<<<<<<
@@ -6456,7 +6479,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6456
6479
  */
6457
6480
  while (1) {
6458
6481
 
6459
- /* "wepoll/_wepoll.pyx":589
6482
+ /* "wepoll/_wepoll.pyx":602
6460
6483
  *
6461
6484
  * while True:
6462
6485
  * with nogil: # <<<<<<<<<<<<<<
@@ -6470,7 +6493,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6470
6493
  __Pyx_FastGIL_Remember();
6471
6494
  /*try:*/ {
6472
6495
 
6473
- /* "wepoll/_wepoll.pyx":590
6496
+ /* "wepoll/_wepoll.pyx":603
6474
6497
  * while True:
6475
6498
  * with nogil:
6476
6499
  * errno = 0 # <<<<<<<<<<<<<<
@@ -6479,7 +6502,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6479
6502
  */
6480
6503
  __pyx_v_errno = 0;
6481
6504
 
6482
- /* "wepoll/_wepoll.pyx":591
6505
+ /* "wepoll/_wepoll.pyx":604
6483
6506
  * with nogil:
6484
6507
  * errno = 0
6485
6508
  * nfds = epoll_wait(handle, evs, maxevents, <int>ms) # <<<<<<<<<<<<<<
@@ -6489,7 +6512,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6489
6512
  __pyx_v_nfds = epoll_wait(__pyx_v_handle, __pyx_v_evs, __pyx_v_maxevents, ((int)__pyx_v_ms));
6490
6513
  }
6491
6514
 
6492
- /* "wepoll/_wepoll.pyx":589
6515
+ /* "wepoll/_wepoll.pyx":602
6493
6516
  *
6494
6517
  * while True:
6495
6518
  * with nogil: # <<<<<<<<<<<<<<
@@ -6506,7 +6529,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6506
6529
  }
6507
6530
  }
6508
6531
 
6509
- /* "wepoll/_wepoll.pyx":593
6532
+ /* "wepoll/_wepoll.pyx":606
6510
6533
  * nfds = epoll_wait(handle, evs, maxevents, <int>ms)
6511
6534
  *
6512
6535
  * if nfds > 0: # <<<<<<<<<<<<<<
@@ -6516,7 +6539,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6516
6539
  __pyx_t_2 = (__pyx_v_nfds > 0);
6517
6540
  if (__pyx_t_2) {
6518
6541
 
6519
- /* "wepoll/_wepoll.pyx":594
6542
+ /* "wepoll/_wepoll.pyx":607
6520
6543
  *
6521
6544
  * if nfds > 0:
6522
6545
  * break # <<<<<<<<<<<<<<
@@ -6525,7 +6548,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6525
6548
  */
6526
6549
  goto __pyx_L13_break;
6527
6550
 
6528
- /* "wepoll/_wepoll.pyx":593
6551
+ /* "wepoll/_wepoll.pyx":606
6529
6552
  * nfds = epoll_wait(handle, evs, maxevents, <int>ms)
6530
6553
  *
6531
6554
  * if nfds > 0: # <<<<<<<<<<<<<<
@@ -6534,7 +6557,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6534
6557
  */
6535
6558
  }
6536
6559
 
6537
- /* "wepoll/_wepoll.pyx":596
6560
+ /* "wepoll/_wepoll.pyx":609
6538
6561
  * break
6539
6562
  *
6540
6563
  * if nfds < 0: # <<<<<<<<<<<<<<
@@ -6544,7 +6567,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6544
6567
  __pyx_t_2 = (__pyx_v_nfds < 0);
6545
6568
  if (unlikely(__pyx_t_2)) {
6546
6569
 
6547
- /* "wepoll/_wepoll.pyx":597
6570
+ /* "wepoll/_wepoll.pyx":610
6548
6571
  *
6549
6572
  * if nfds < 0:
6550
6573
  * PyMem_Free(evs) # <<<<<<<<<<<<<<
@@ -6553,16 +6576,16 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6553
6576
  */
6554
6577
  PyMem_Free(__pyx_v_evs);
6555
6578
 
6556
- /* "wepoll/_wepoll.pyx":598
6579
+ /* "wepoll/_wepoll.pyx":611
6557
6580
  * if nfds < 0:
6558
6581
  * PyMem_Free(evs)
6559
6582
  * PyErr_SetFromErrno(OSError) # <<<<<<<<<<<<<<
6560
6583
  * raise
6561
6584
  *
6562
6585
  */
6563
- __pyx_t_10 = PyErr_SetFromErrno(__pyx_builtin_OSError); if (unlikely(__pyx_t_10 == ((PyObject *)0))) __PYX_ERR(0, 598, __pyx_L1_error)
6586
+ __pyx_t_10 = PyErr_SetFromErrno(__pyx_builtin_OSError); if (unlikely(__pyx_t_10 == ((PyObject *)0))) __PYX_ERR(0, 611, __pyx_L1_error)
6564
6587
 
6565
- /* "wepoll/_wepoll.pyx":599
6588
+ /* "wepoll/_wepoll.pyx":612
6566
6589
  * PyMem_Free(evs)
6567
6590
  * PyErr_SetFromErrno(OSError)
6568
6591
  * raise # <<<<<<<<<<<<<<
@@ -6570,9 +6593,9 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6570
6593
  * # check for ctrl+C from end user wanting to stop program
6571
6594
  */
6572
6595
  __Pyx_ReraiseException();
6573
- __PYX_ERR(0, 599, __pyx_L1_error)
6596
+ __PYX_ERR(0, 612, __pyx_L1_error)
6574
6597
 
6575
- /* "wepoll/_wepoll.pyx":596
6598
+ /* "wepoll/_wepoll.pyx":609
6576
6599
  * break
6577
6600
  *
6578
6601
  * if nfds < 0: # <<<<<<<<<<<<<<
@@ -6581,18 +6604,18 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6581
6604
  */
6582
6605
  }
6583
6606
 
6584
- /* "wepoll/_wepoll.pyx":602
6607
+ /* "wepoll/_wepoll.pyx":615
6585
6608
  *
6586
6609
  * # check for ctrl+C from end user wanting to stop program
6587
6610
  * if PyErr_CheckSignals() < 0: # <<<<<<<<<<<<<<
6588
6611
  * PyMem_Free(evs)
6589
6612
  * raise
6590
6613
  */
6591
- __pyx_t_11 = PyErr_CheckSignals(); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 602, __pyx_L1_error)
6614
+ __pyx_t_11 = PyErr_CheckSignals(); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 615, __pyx_L1_error)
6592
6615
  __pyx_t_2 = (__pyx_t_11 < 0);
6593
6616
  if (unlikely(__pyx_t_2)) {
6594
6617
 
6595
- /* "wepoll/_wepoll.pyx":603
6618
+ /* "wepoll/_wepoll.pyx":616
6596
6619
  * # check for ctrl+C from end user wanting to stop program
6597
6620
  * if PyErr_CheckSignals() < 0:
6598
6621
  * PyMem_Free(evs) # <<<<<<<<<<<<<<
@@ -6601,7 +6624,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6601
6624
  */
6602
6625
  PyMem_Free(__pyx_v_evs);
6603
6626
 
6604
- /* "wepoll/_wepoll.pyx":604
6627
+ /* "wepoll/_wepoll.pyx":617
6605
6628
  * if PyErr_CheckSignals() < 0:
6606
6629
  * PyMem_Free(evs)
6607
6630
  * raise # <<<<<<<<<<<<<<
@@ -6609,9 +6632,9 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6609
6632
  * if timeout >= 0:
6610
6633
  */
6611
6634
  __Pyx_ReraiseException();
6612
- __PYX_ERR(0, 604, __pyx_L1_error)
6635
+ __PYX_ERR(0, 617, __pyx_L1_error)
6613
6636
 
6614
- /* "wepoll/_wepoll.pyx":602
6637
+ /* "wepoll/_wepoll.pyx":615
6615
6638
  *
6616
6639
  * # check for ctrl+C from end user wanting to stop program
6617
6640
  * if PyErr_CheckSignals() < 0: # <<<<<<<<<<<<<<
@@ -6620,43 +6643,43 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6620
6643
  */
6621
6644
  }
6622
6645
 
6623
- /* "wepoll/_wepoll.pyx":606
6646
+ /* "wepoll/_wepoll.pyx":619
6624
6647
  * raise
6625
6648
  *
6626
6649
  * if timeout >= 0: # <<<<<<<<<<<<<<
6627
6650
  * timeout = deadline - monotonic_ns()
6628
6651
  * if (timeout < 0):
6629
6652
  */
6630
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_timeout, __pyx_mstate_global->__pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 606, __pyx_L1_error)
6631
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 606, __pyx_L1_error)
6653
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_timeout, __pyx_mstate_global->__pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error)
6654
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 619, __pyx_L1_error)
6632
6655
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6633
6656
  if (__pyx_t_2) {
6634
6657
 
6635
- /* "wepoll/_wepoll.pyx":607
6658
+ /* "wepoll/_wepoll.pyx":620
6636
6659
  *
6637
6660
  * if timeout >= 0:
6638
6661
  * timeout = deadline - monotonic_ns() # <<<<<<<<<<<<<<
6639
6662
  * if (timeout < 0):
6640
6663
  * nfds = 0
6641
6664
  */
6642
- __pyx_t_3 = __Pyx_PyLong_From_int64_t((__pyx_v_deadline - __pyx_f_7cpython_4time_monotonic_ns())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L1_error)
6665
+ __pyx_t_3 = __Pyx_PyLong_From_int64_t((__pyx_v_deadline - __pyx_f_7cpython_4time_monotonic_ns())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error)
6643
6666
  __Pyx_GOTREF(__pyx_t_3);
6644
6667
  __Pyx_DECREF_SET(__pyx_v_timeout, __pyx_t_3);
6645
6668
  __pyx_t_3 = 0;
6646
6669
 
6647
- /* "wepoll/_wepoll.pyx":608
6670
+ /* "wepoll/_wepoll.pyx":621
6648
6671
  * if timeout >= 0:
6649
6672
  * timeout = deadline - monotonic_ns()
6650
6673
  * if (timeout < 0): # <<<<<<<<<<<<<<
6651
6674
  * nfds = 0
6652
6675
  * break
6653
6676
  */
6654
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_timeout, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 608, __pyx_L1_error)
6655
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 608, __pyx_L1_error)
6677
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_timeout, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error)
6678
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 621, __pyx_L1_error)
6656
6679
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6657
6680
  if (__pyx_t_2) {
6658
6681
 
6659
- /* "wepoll/_wepoll.pyx":609
6682
+ /* "wepoll/_wepoll.pyx":622
6660
6683
  * timeout = deadline - monotonic_ns()
6661
6684
  * if (timeout < 0):
6662
6685
  * nfds = 0 # <<<<<<<<<<<<<<
@@ -6665,7 +6688,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6665
6688
  */
6666
6689
  __pyx_v_nfds = 0;
6667
6690
 
6668
- /* "wepoll/_wepoll.pyx":610
6691
+ /* "wepoll/_wepoll.pyx":623
6669
6692
  * if (timeout < 0):
6670
6693
  * nfds = 0
6671
6694
  * break # <<<<<<<<<<<<<<
@@ -6674,7 +6697,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6674
6697
  */
6675
6698
  goto __pyx_L13_break;
6676
6699
 
6677
- /* "wepoll/_wepoll.pyx":608
6700
+ /* "wepoll/_wepoll.pyx":621
6678
6701
  * if timeout >= 0:
6679
6702
  * timeout = deadline - monotonic_ns()
6680
6703
  * if (timeout < 0): # <<<<<<<<<<<<<<
@@ -6683,17 +6706,17 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6683
6706
  */
6684
6707
  }
6685
6708
 
6686
- /* "wepoll/_wepoll.pyx":611
6709
+ /* "wepoll/_wepoll.pyx":624
6687
6710
  * nfds = 0
6688
6711
  * break
6689
6712
  * ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING) # <<<<<<<<<<<<<<
6690
6713
  *
6691
6714
  * elist = [(evs[i].data.fd, evs[i].events) for i in range(nfds)]
6692
6715
  */
6693
- __pyx_t_12 = __Pyx_PyLong_As_int64_t(__pyx_v_timeout); if (unlikely((__pyx_t_12 == ((__Pyx_PyTime_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
6716
+ __pyx_t_12 = __Pyx_PyLong_As_int64_t(__pyx_v_timeout); if (unlikely((__pyx_t_12 == ((__Pyx_PyTime_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 624, __pyx_L1_error)
6694
6717
  __pyx_v_ms = _PyTime_AsMilliseconds(__pyx_t_12, _PyTime_ROUND_CEILING);
6695
6718
 
6696
- /* "wepoll/_wepoll.pyx":606
6719
+ /* "wepoll/_wepoll.pyx":619
6697
6720
  * raise
6698
6721
  *
6699
6722
  * if timeout >= 0: # <<<<<<<<<<<<<<
@@ -6704,7 +6727,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6704
6727
  }
6705
6728
  __pyx_L13_break:;
6706
6729
 
6707
- /* "wepoll/_wepoll.pyx":613
6730
+ /* "wepoll/_wepoll.pyx":626
6708
6731
  * ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING)
6709
6732
  *
6710
6733
  * elist = [(evs[i].data.fd, evs[i].events) for i in range(nfds)] # <<<<<<<<<<<<<<
@@ -6712,32 +6735,32 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6712
6735
  * return elist
6713
6736
  */
6714
6737
  { /* enter inner scope */
6715
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 613, __pyx_L1_error)
6738
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error)
6716
6739
  __Pyx_GOTREF(__pyx_t_3);
6717
6740
  __pyx_t_11 = __pyx_v_nfds;
6718
6741
  __pyx_t_13 = __pyx_t_11;
6719
6742
  for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
6720
6743
  __pyx_7genexpr__pyx_v_i = __pyx_t_14;
6721
- __pyx_t_5 = __Pyx_PyLong_From_int((__pyx_v_evs[__pyx_7genexpr__pyx_v_i]).data.fd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 613, __pyx_L1_error)
6744
+ __pyx_t_5 = __Pyx_PyLong_From_int((__pyx_v_evs[__pyx_7genexpr__pyx_v_i]).data.fd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L1_error)
6722
6745
  __Pyx_GOTREF(__pyx_t_5);
6723
- __pyx_t_6 = __Pyx_PyLong_From_uint32_t((__pyx_v_evs[__pyx_7genexpr__pyx_v_i]).events); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error)
6746
+ __pyx_t_6 = __Pyx_PyLong_From_uint32_t((__pyx_v_evs[__pyx_7genexpr__pyx_v_i]).events); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 626, __pyx_L1_error)
6724
6747
  __Pyx_GOTREF(__pyx_t_6);
6725
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error)
6748
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 626, __pyx_L1_error)
6726
6749
  __Pyx_GOTREF(__pyx_t_7);
6727
6750
  __Pyx_GIVEREF(__pyx_t_5);
6728
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 613, __pyx_L1_error);
6751
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 626, __pyx_L1_error);
6729
6752
  __Pyx_GIVEREF(__pyx_t_6);
6730
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 613, __pyx_L1_error);
6753
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 626, __pyx_L1_error);
6731
6754
  __pyx_t_5 = 0;
6732
6755
  __pyx_t_6 = 0;
6733
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 613, __pyx_L1_error)
6756
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 626, __pyx_L1_error)
6734
6757
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6735
6758
  }
6736
6759
  } /* exit inner scope */
6737
6760
  __pyx_v_elist = ((PyObject*)__pyx_t_3);
6738
6761
  __pyx_t_3 = 0;
6739
6762
 
6740
- /* "wepoll/_wepoll.pyx":614
6763
+ /* "wepoll/_wepoll.pyx":627
6741
6764
  *
6742
6765
  * elist = [(evs[i].data.fd, evs[i].events) for i in range(nfds)]
6743
6766
  * PyMem_Free(evs) # <<<<<<<<<<<<<<
@@ -6746,7 +6769,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6746
6769
  */
6747
6770
  PyMem_Free(__pyx_v_evs);
6748
6771
 
6749
- /* "wepoll/_wepoll.pyx":615
6772
+ /* "wepoll/_wepoll.pyx":628
6750
6773
  * elist = [(evs[i].data.fd, evs[i].events) for i in range(nfds)]
6751
6774
  * PyMem_Free(evs)
6752
6775
  * return elist # <<<<<<<<<<<<<<
@@ -6758,7 +6781,7 @@ static PyObject *__pyx_f_6wepoll_7_wepoll_5epoll_poll(struct __pyx_obj_6wepoll_7
6758
6781
  __pyx_r = __pyx_v_elist;
6759
6782
  goto __pyx_L0;
6760
6783
 
6761
- /* "wepoll/_wepoll.pyx":538
6784
+ /* "wepoll/_wepoll.pyx":551
6762
6785
  * raise
6763
6786
  *
6764
6787
  * cpdef list poll(self, object timeout = None, int maxevents = -1): # <<<<<<<<<<<<<<
@@ -6824,32 +6847,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
6824
6847
  {
6825
6848
  PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_timeout,&__pyx_mstate_global->__pyx_n_u_maxevents,0};
6826
6849
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6827
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 538, __pyx_L3_error)
6850
+ if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 551, __pyx_L3_error)
6828
6851
  if (__pyx_kwds_len > 0) {
6829
6852
  switch (__pyx_nargs) {
6830
6853
  case 2:
6831
6854
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6832
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 538, __pyx_L3_error)
6855
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 551, __pyx_L3_error)
6833
6856
  CYTHON_FALLTHROUGH;
6834
6857
  case 1:
6835
6858
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6836
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 538, __pyx_L3_error)
6859
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 551, __pyx_L3_error)
6837
6860
  CYTHON_FALLTHROUGH;
6838
6861
  case 0: break;
6839
6862
  default: goto __pyx_L5_argtuple_error;
6840
6863
  }
6841
6864
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
6842
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "poll", 0) < 0) __PYX_ERR(0, 538, __pyx_L3_error)
6865
+ if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "poll", 0) < 0) __PYX_ERR(0, 551, __pyx_L3_error)
6843
6866
  if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
6844
6867
  } else {
6845
6868
  switch (__pyx_nargs) {
6846
6869
  case 2:
6847
6870
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6848
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 538, __pyx_L3_error)
6871
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 551, __pyx_L3_error)
6849
6872
  CYTHON_FALLTHROUGH;
6850
6873
  case 1:
6851
6874
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6852
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 538, __pyx_L3_error)
6875
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 551, __pyx_L3_error)
6853
6876
  CYTHON_FALLTHROUGH;
6854
6877
  case 0: break;
6855
6878
  default: goto __pyx_L5_argtuple_error;
@@ -6858,14 +6881,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
6858
6881
  }
6859
6882
  __pyx_v_timeout = values[0];
6860
6883
  if (values[1]) {
6861
- __pyx_v_maxevents = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_maxevents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 538, __pyx_L3_error)
6884
+ __pyx_v_maxevents = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_maxevents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L3_error)
6862
6885
  } else {
6863
6886
  __pyx_v_maxevents = ((int)-1);
6864
6887
  }
6865
6888
  }
6866
6889
  goto __pyx_L6_skip;
6867
6890
  __pyx_L5_argtuple_error:;
6868
- __Pyx_RaiseArgtupleInvalid("poll", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 538, __pyx_L3_error)
6891
+ __Pyx_RaiseArgtupleInvalid("poll", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 551, __pyx_L3_error)
6869
6892
  __pyx_L6_skip:;
6870
6893
  goto __pyx_L4_argument_unpacking_done;
6871
6894
  __pyx_L3_error:;
@@ -6899,7 +6922,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_12poll(struct __pyx_obj_6wepol
6899
6922
  __pyx_t_2.__pyx_n = 2;
6900
6923
  __pyx_t_2.timeout = __pyx_v_timeout;
6901
6924
  __pyx_t_2.maxevents = __pyx_v_maxevents;
6902
- __pyx_t_1 = __pyx_vtabptr_6wepoll_7_wepoll_epoll->poll(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error)
6925
+ __pyx_t_1 = __pyx_vtabptr_6wepoll_7_wepoll_epoll->poll(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
6903
6926
  __Pyx_GOTREF(__pyx_t_1);
6904
6927
  __pyx_r = __pyx_t_1;
6905
6928
  __pyx_t_1 = 0;
@@ -6916,7 +6939,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_12poll(struct __pyx_obj_6wepol
6916
6939
  return __pyx_r;
6917
6940
  }
6918
6941
 
6919
- /* "wepoll/_wepoll.pyx":617
6942
+ /* "wepoll/_wepoll.pyx":630
6920
6943
  * return elist
6921
6944
  *
6922
6945
  * def __enter__(self): # <<<<<<<<<<<<<<
@@ -6971,7 +6994,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_14__enter__(struct __pyx_obj_6
6971
6994
  __Pyx_RefNannyDeclarations
6972
6995
  __Pyx_RefNannySetupContext("__enter__", 0);
6973
6996
 
6974
- /* "wepoll/_wepoll.pyx":618
6997
+ /* "wepoll/_wepoll.pyx":631
6975
6998
  *
6976
6999
  * def __enter__(self):
6977
7000
  * return self # <<<<<<<<<<<<<<
@@ -6983,7 +7006,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_14__enter__(struct __pyx_obj_6
6983
7006
  __pyx_r = ((PyObject *)__pyx_v_self);
6984
7007
  goto __pyx_L0;
6985
7008
 
6986
- /* "wepoll/_wepoll.pyx":617
7009
+ /* "wepoll/_wepoll.pyx":630
6987
7010
  * return elist
6988
7011
  *
6989
7012
  * def __enter__(self): # <<<<<<<<<<<<<<
@@ -6998,7 +7021,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_14__enter__(struct __pyx_obj_6
6998
7021
  return __pyx_r;
6999
7022
  }
7000
7023
 
7001
- /* "wepoll/_wepoll.pyx":620
7024
+ /* "wepoll/_wepoll.pyx":633
7002
7025
  * return self
7003
7026
  *
7004
7027
  * def __exit__(self, *args): # <<<<<<<<<<<<<<
@@ -7044,18 +7067,18 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_16__exit__(struct __pyx_obj_6w
7044
7067
  int __pyx_clineno = 0;
7045
7068
  __Pyx_RefNannySetupContext("__exit__", 0);
7046
7069
 
7047
- /* "wepoll/_wepoll.pyx":621
7070
+ /* "wepoll/_wepoll.pyx":634
7048
7071
  *
7049
7072
  * def __exit__(self, *args):
7050
7073
  * self.close() # <<<<<<<<<<<<<<
7051
7074
  *
7052
7075
  * def __dealloc__(self):
7053
7076
  */
7054
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_close(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error)
7077
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_close(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
7055
7078
  __Pyx_GOTREF(__pyx_t_1);
7056
7079
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7057
7080
 
7058
- /* "wepoll/_wepoll.pyx":620
7081
+ /* "wepoll/_wepoll.pyx":633
7059
7082
  * return self
7060
7083
  *
7061
7084
  * def __exit__(self, *args): # <<<<<<<<<<<<<<
@@ -7076,7 +7099,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_16__exit__(struct __pyx_obj_6w
7076
7099
  return __pyx_r;
7077
7100
  }
7078
7101
 
7079
- /* "wepoll/_wepoll.pyx":623
7102
+ /* "wepoll/_wepoll.pyx":636
7080
7103
  * self.close()
7081
7104
  *
7082
7105
  * def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -7105,18 +7128,18 @@ static void __pyx_pf_6wepoll_7_wepoll_5epoll_18__dealloc__(struct __pyx_obj_6wep
7105
7128
  int __pyx_clineno = 0;
7106
7129
  __Pyx_RefNannySetupContext("__dealloc__", 0);
7107
7130
 
7108
- /* "wepoll/_wepoll.pyx":624
7131
+ /* "wepoll/_wepoll.pyx":637
7109
7132
  *
7110
7133
  * def __dealloc__(self):
7111
7134
  * self.close() # <<<<<<<<<<<<<<
7112
7135
  *
7113
7136
  * @classmethod
7114
7137
  */
7115
- __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_close(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
7138
+ __pyx_t_1 = __pyx_f_6wepoll_7_wepoll_5epoll_close(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error)
7116
7139
  __Pyx_GOTREF(__pyx_t_1);
7117
7140
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7118
7141
 
7119
- /* "wepoll/_wepoll.pyx":623
7142
+ /* "wepoll/_wepoll.pyx":636
7120
7143
  * self.close()
7121
7144
  *
7122
7145
  * def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -7133,7 +7156,7 @@ static void __pyx_pf_6wepoll_7_wepoll_5epoll_18__dealloc__(struct __pyx_obj_6wep
7133
7156
  __Pyx_RefNannyFinishContext();
7134
7157
  }
7135
7158
 
7136
- /* "wepoll/_wepoll.pyx":626
7159
+ /* "wepoll/_wepoll.pyx":639
7137
7160
  * self.close()
7138
7161
  *
7139
7162
  * @classmethod # <<<<<<<<<<<<<<
@@ -7180,32 +7203,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
7180
7203
  {
7181
7204
  PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fd,0};
7182
7205
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
7183
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 626, __pyx_L3_error)
7206
+ if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 639, __pyx_L3_error)
7184
7207
  if (__pyx_kwds_len > 0) {
7185
7208
  switch (__pyx_nargs) {
7186
7209
  case 1:
7187
7210
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7188
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 626, __pyx_L3_error)
7211
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 639, __pyx_L3_error)
7189
7212
  CYTHON_FALLTHROUGH;
7190
7213
  case 0: break;
7191
7214
  default: goto __pyx_L5_argtuple_error;
7192
7215
  }
7193
7216
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
7194
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromfd", 0) < 0) __PYX_ERR(0, 626, __pyx_L3_error)
7217
+ if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromfd", 0) < 0) __PYX_ERR(0, 639, __pyx_L3_error)
7195
7218
  for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
7196
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromfd", 1, 1, 1, i); __PYX_ERR(0, 626, __pyx_L3_error) }
7219
+ if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromfd", 1, 1, 1, i); __PYX_ERR(0, 639, __pyx_L3_error) }
7197
7220
  }
7198
7221
  } else if (unlikely(__pyx_nargs != 1)) {
7199
7222
  goto __pyx_L5_argtuple_error;
7200
7223
  } else {
7201
7224
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7202
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 626, __pyx_L3_error)
7225
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 639, __pyx_L3_error)
7203
7226
  }
7204
7227
  __pyx_v_fd = values[0];
7205
7228
  }
7206
7229
  goto __pyx_L6_skip;
7207
7230
  __pyx_L5_argtuple_error:;
7208
- __Pyx_RaiseArgtupleInvalid("fromfd", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 626, __pyx_L3_error)
7231
+ __Pyx_RaiseArgtupleInvalid("fromfd", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 639, __pyx_L3_error)
7209
7232
  __pyx_L6_skip:;
7210
7233
  goto __pyx_L4_argument_unpacking_done;
7211
7234
  __pyx_L3_error:;
@@ -7239,7 +7262,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_20fromfd(PyTypeObject *__pyx_v
7239
7262
  int __pyx_clineno = 0;
7240
7263
  __Pyx_RefNannySetupContext("fromfd", 0);
7241
7264
 
7242
- /* "wepoll/_wepoll.pyx":628
7265
+ /* "wepoll/_wepoll.pyx":641
7243
7266
  * @classmethod
7244
7267
  * def fromfd(cls, object fd):
7245
7268
  * cdef epoll poll = cls.__new__(cls) # <<<<<<<<<<<<<<
@@ -7248,36 +7271,36 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_20fromfd(PyTypeObject *__pyx_v
7248
7271
  */
7249
7272
  if (unlikely(((PyObject *)__pyx_v_cls) == Py_None)) {
7250
7273
  PyErr_SetString(PyExc_TypeError, "object.__new__(X): X is not a type object (NoneType)");
7251
- __PYX_ERR(0, 628, __pyx_L1_error)
7274
+ __PYX_ERR(0, 641, __pyx_L1_error)
7252
7275
  }
7253
- __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_cls), __pyx_mstate_global->__pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error)
7276
+ __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_cls), __pyx_mstate_global->__pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
7254
7277
  __Pyx_GOTREF(__pyx_t_1);
7255
- if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll)))) __PYX_ERR(0, 628, __pyx_L1_error)
7278
+ if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll)))) __PYX_ERR(0, 641, __pyx_L1_error)
7256
7279
  __pyx_v_poll = ((struct __pyx_obj_6wepoll_7_wepoll_epoll *)__pyx_t_1);
7257
7280
  __pyx_t_1 = 0;
7258
7281
 
7259
- /* "wepoll/_wepoll.pyx":629
7282
+ /* "wepoll/_wepoll.pyx":642
7260
7283
  * def fromfd(cls, object fd):
7261
7284
  * cdef epoll poll = cls.__new__(cls)
7262
7285
  * if poll._init(FD_SETSIZE - 1, PyLong_AsVoidPtr(fd)) < 0: # <<<<<<<<<<<<<<
7263
7286
  * raise
7264
7287
  * return poll
7265
7288
  */
7266
- __pyx_t_2 = PyLong_AsVoidPtr(__pyx_v_fd); if (unlikely(__pyx_t_2 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 629, __pyx_L1_error)
7267
- __pyx_t_3 = __pyx_f_6wepoll_7_wepoll_5epoll__init(__pyx_v_poll, 0x1ff, __pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 629, __pyx_L1_error)
7289
+ __pyx_t_2 = PyLong_AsVoidPtr(__pyx_v_fd); if (unlikely(__pyx_t_2 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L1_error)
7290
+ __pyx_t_3 = __pyx_f_6wepoll_7_wepoll_5epoll__init(__pyx_v_poll, 0x1ff, __pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L1_error)
7268
7291
  __pyx_t_4 = (__pyx_t_3 < 0);
7269
7292
  if (unlikely(__pyx_t_4)) {
7270
7293
 
7271
- /* "wepoll/_wepoll.pyx":630
7294
+ /* "wepoll/_wepoll.pyx":643
7272
7295
  * cdef epoll poll = cls.__new__(cls)
7273
7296
  * if poll._init(FD_SETSIZE - 1, PyLong_AsVoidPtr(fd)) < 0:
7274
7297
  * raise # <<<<<<<<<<<<<<
7275
7298
  * return poll
7276
7299
  */
7277
7300
  __Pyx_ReraiseException();
7278
- __PYX_ERR(0, 630, __pyx_L1_error)
7301
+ __PYX_ERR(0, 643, __pyx_L1_error)
7279
7302
 
7280
- /* "wepoll/_wepoll.pyx":629
7303
+ /* "wepoll/_wepoll.pyx":642
7281
7304
  * def fromfd(cls, object fd):
7282
7305
  * cdef epoll poll = cls.__new__(cls)
7283
7306
  * if poll._init(FD_SETSIZE - 1, PyLong_AsVoidPtr(fd)) < 0: # <<<<<<<<<<<<<<
@@ -7286,7 +7309,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_20fromfd(PyTypeObject *__pyx_v
7286
7309
  */
7287
7310
  }
7288
7311
 
7289
- /* "wepoll/_wepoll.pyx":631
7312
+ /* "wepoll/_wepoll.pyx":644
7290
7313
  * if poll._init(FD_SETSIZE - 1, PyLong_AsVoidPtr(fd)) < 0:
7291
7314
  * raise
7292
7315
  * return poll # <<<<<<<<<<<<<<
@@ -7296,7 +7319,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_20fromfd(PyTypeObject *__pyx_v
7296
7319
  __pyx_r = ((PyObject *)__pyx_v_poll);
7297
7320
  goto __pyx_L0;
7298
7321
 
7299
- /* "wepoll/_wepoll.pyx":626
7322
+ /* "wepoll/_wepoll.pyx":639
7300
7323
  * self.close()
7301
7324
  *
7302
7325
  * @classmethod # <<<<<<<<<<<<<<
@@ -7316,12 +7339,12 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_20fromfd(PyTypeObject *__pyx_v
7316
7339
  return __pyx_r;
7317
7340
  }
7318
7341
 
7319
- /* "wepoll/_wepoll.pxd":9
7342
+ /* "wepoll/_wepoll.pxd":10
7320
7343
  * cdef:
7321
7344
  * HANDLE handle
7322
7345
  * readonly bint closed # <<<<<<<<<<<<<<
7323
- *
7324
- * cdef int _create(self, int sizehint)
7346
+ * # Attempts to make socketmodule threadsafe during use...
7347
+ * PySocketModule_APIObject* socket_api
7325
7348
  */
7326
7349
 
7327
7350
  /* Python wrapper */
@@ -7348,7 +7371,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_6closed___get__(struct __pyx_o
7348
7371
  int __pyx_clineno = 0;
7349
7372
  __Pyx_RefNannySetupContext("__get__", 0);
7350
7373
  __Pyx_XDECREF(__pyx_r);
7351
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
7374
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 10, __pyx_L1_error)
7352
7375
  __Pyx_GOTREF(__pyx_t_1);
7353
7376
  __pyx_r = __pyx_t_1;
7354
7377
  __pyx_t_1 = 0;
@@ -7367,7 +7390,7 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_6closed___get__(struct __pyx_o
7367
7390
 
7368
7391
  /* "(tree fragment)":1
7369
7392
  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7370
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling"
7393
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling"
7371
7394
  * def __setstate_cython__(self, __pyx_state):
7372
7395
  */
7373
7396
 
@@ -7423,16 +7446,16 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_22__reduce_cython__(CYTHON_UNU
7423
7446
 
7424
7447
  /* "(tree fragment)":2
7425
7448
  * def __reduce_cython__(self):
7426
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
7449
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
7427
7450
  * def __setstate_cython__(self, __pyx_state):
7428
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling"
7451
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling"
7429
7452
  */
7430
- __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_self_handle_cannot_be_converted, 0, 0);
7453
+ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_self_handle_self_socket_api_cann, 0, 0);
7431
7454
  __PYX_ERR(4, 2, __pyx_L1_error)
7432
7455
 
7433
7456
  /* "(tree fragment)":1
7434
7457
  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7435
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling"
7458
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling"
7436
7459
  * def __setstate_cython__(self, __pyx_state):
7437
7460
  */
7438
7461
 
@@ -7447,9 +7470,9 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_22__reduce_cython__(CYTHON_UNU
7447
7470
 
7448
7471
  /* "(tree fragment)":3
7449
7472
  * def __reduce_cython__(self):
7450
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling"
7473
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling"
7451
7474
  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7452
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling"
7475
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling"
7453
7476
  */
7454
7477
 
7455
7478
  /* Python wrapper */
@@ -7546,18 +7569,18 @@ static PyObject *__pyx_pf_6wepoll_7_wepoll_5epoll_24__setstate_cython__(CYTHON_U
7546
7569
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
7547
7570
 
7548
7571
  /* "(tree fragment)":4
7549
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling"
7572
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling"
7550
7573
  * def __setstate_cython__(self, __pyx_state):
7551
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
7574
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
7552
7575
  */
7553
- __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_self_handle_cannot_be_converted, 0, 0);
7576
+ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_self_handle_self_socket_api_cann, 0, 0);
7554
7577
  __PYX_ERR(4, 4, __pyx_L1_error)
7555
7578
 
7556
7579
  /* "(tree fragment)":3
7557
7580
  * def __reduce_cython__(self):
7558
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling"
7581
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling"
7559
7582
  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7560
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling"
7583
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling"
7561
7584
  */
7562
7585
 
7563
7586
  /* function exit code */
@@ -7772,6 +7795,7 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
7772
7795
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
7773
7796
  /*--- Type init code ---*/
7774
7797
  __pyx_vtabptr_6wepoll_7_wepoll_epoll = &__pyx_vtable_6wepoll_7_wepoll_epoll;
7798
+ __pyx_vtable_6wepoll_7_wepoll_epoll._fd_from_object = (SOCKET (*)(struct __pyx_obj_6wepoll_7_wepoll_epoll *, PyObject *))__pyx_f_6wepoll_7_wepoll_5epoll__fd_from_object;
7775
7799
  __pyx_vtable_6wepoll_7_wepoll_epoll._create = (int (*)(struct __pyx_obj_6wepoll_7_wepoll_epoll *, int))__pyx_f_6wepoll_7_wepoll_5epoll__create;
7776
7800
  __pyx_vtable_6wepoll_7_wepoll_epoll._create1 = (int (*)(struct __pyx_obj_6wepoll_7_wepoll_epoll *))__pyx_f_6wepoll_7_wepoll_5epoll__create1;
7777
7801
  __pyx_vtable_6wepoll_7_wepoll_epoll._close = (int (*)(struct __pyx_obj_6wepoll_7_wepoll_epoll *))__pyx_f_6wepoll_7_wepoll_5epoll__close;
@@ -7787,25 +7811,25 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
7787
7811
  __pyx_vtable_6wepoll_7_wepoll_epoll.poll = (PyObject *(*)(struct __pyx_obj_6wepoll_7_wepoll_epoll *, int __pyx_skip_dispatch, struct __pyx_opt_args_6wepoll_7_wepoll_5epoll_poll *__pyx_optional_args))__pyx_f_6wepoll_7_wepoll_5epoll_poll;
7788
7812
  __pyx_vtable_6wepoll_7_wepoll_epoll.fileno = (uintptr_t (*)(struct __pyx_obj_6wepoll_7_wepoll_epoll *, int __pyx_skip_dispatch))__pyx_f_6wepoll_7_wepoll_5epoll_fileno;
7789
7813
  #if CYTHON_USE_TYPE_SPECS
7790
- __pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6wepoll_7_wepoll_epoll_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll)) __PYX_ERR(0, 358, __pyx_L1_error)
7791
- if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6wepoll_7_wepoll_epoll_spec, __pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
7814
+ __pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6wepoll_7_wepoll_epoll_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll)) __PYX_ERR(0, 355, __pyx_L1_error)
7815
+ if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6wepoll_7_wepoll_epoll_spec, __pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
7792
7816
  #else
7793
7817
  __pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll = &__pyx_type_6wepoll_7_wepoll_epoll;
7794
7818
  #endif
7795
7819
  #if !CYTHON_COMPILING_IN_LIMITED_API
7796
7820
  #endif
7797
7821
  #if !CYTHON_USE_TYPE_SPECS
7798
- if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
7822
+ if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
7799
7823
  #endif
7800
7824
  #if !CYTHON_COMPILING_IN_LIMITED_API
7801
7825
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll->tp_dictoffset && __pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll->tp_getattro == PyObject_GenericGetAttr)) {
7802
7826
  __pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll->tp_getattro = PyObject_GenericGetAttr;
7803
7827
  }
7804
7828
  #endif
7805
- if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_vtabptr_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
7806
- if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
7807
- if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_epoll, (PyObject *) __pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
7808
- if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
7829
+ if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_vtabptr_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
7830
+ if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
7831
+ if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_epoll, (PyObject *) __pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
7832
+ if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_6wepoll_7_wepoll_epoll) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
7809
7833
  __Pyx_RefNannyFinishContext();
7810
7834
  return 0;
7811
7835
  __pyx_L1_error:;
@@ -7824,27 +7848,27 @@ static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
7824
7848
  /*--- Type import code ---*/
7825
7849
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9, __pyx_L1_error)
7826
7850
  __Pyx_GOTREF(__pyx_t_1);
7827
- __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_1_3(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
7851
+ __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_1_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
7828
7852
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7829
- sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_3(PyTypeObject),
7853
+ sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(PyTypeObject),
7830
7854
  #elif CYTHON_COMPILING_IN_LIMITED_API
7831
7855
  0, 0,
7832
7856
  #else
7833
- sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_3(PyHeapTypeObject),
7857
+ sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(PyHeapTypeObject),
7834
7858
  #endif
7835
- __Pyx_ImportType_CheckSize_Warn_3_1_3); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(5, 9, __pyx_L1_error)
7859
+ __Pyx_ImportType_CheckSize_Warn_3_1_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(5, 9, __pyx_L1_error)
7836
7860
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7837
- __pyx_t_1 = PyImport_ImportModule("_socket"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 105, __pyx_L1_error)
7861
+ __pyx_t_1 = PyImport_ImportModule("_socket"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 113, __pyx_L1_error)
7838
7862
  __Pyx_GOTREF(__pyx_t_1);
7839
- __pyx_mstate->__pyx_ptype_6wepoll_6socket_socket = __Pyx_ImportType_3_1_3(__pyx_t_1, "_socket", "socket",
7863
+ __pyx_mstate->__pyx_ptype_6wepoll_6socket_socket = __Pyx_ImportType_3_1_4(__pyx_t_1, "_socket", "socket",
7840
7864
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7841
- sizeof(PySocketSockObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_3(PySocketSockObject),
7865
+ sizeof(PySocketSockObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(PySocketSockObject),
7842
7866
  #elif CYTHON_COMPILING_IN_LIMITED_API
7843
- sizeof(PySocketSockObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_3(PySocketSockObject),
7867
+ sizeof(PySocketSockObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(PySocketSockObject),
7844
7868
  #else
7845
- sizeof(PySocketSockObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_3(PySocketSockObject),
7869
+ sizeof(PySocketSockObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(PySocketSockObject),
7846
7870
  #endif
7847
- __Pyx_ImportType_CheckSize_Ignore_3_1_3); if (!__pyx_mstate->__pyx_ptype_6wepoll_6socket_socket) __PYX_ERR(2, 105, __pyx_L1_error)
7871
+ __Pyx_ImportType_CheckSize_Ignore_3_1_4); if (!__pyx_mstate->__pyx_ptype_6wepoll_6socket_socket) __PYX_ERR(2, 113, __pyx_L1_error)
7848
7872
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7849
7873
  __Pyx_RefNannyFinishContext();
7850
7874
  return 0;
@@ -8047,9 +8071,8 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__wepoll(PyObject *__pyx_pyinit_mod
8047
8071
  #endif
8048
8072
  __pyx_mstatetype *__pyx_mstate = NULL;
8049
8073
  PyObject *__pyx_t_1 = NULL;
8050
- int __pyx_t_2;
8074
+ PyObject *__pyx_t_2 = NULL;
8051
8075
  PyObject *__pyx_t_3 = NULL;
8052
- PyObject *__pyx_t_4 = NULL;
8053
8076
  int __pyx_lineno = 0;
8054
8077
  const char *__pyx_filename = NULL;
8055
8078
  int __pyx_clineno = 0;
@@ -8156,16 +8179,7 @@ __Pyx_RefNannySetupContext("PyInit__wepoll", 0);
8156
8179
  (void)__Pyx_modinit_function_import_code(__pyx_mstate);
8157
8180
  /*--- Execution code ---*/
8158
8181
 
8159
- /* "wepoll/_wepoll.pyx":15
8160
- * # Inspired by the original 2006 cython epoll twisted code and CPython's vesion
8161
- *
8162
- * import_socket() # <<<<<<<<<<<<<<
8163
- *
8164
- *
8165
- */
8166
- __pyx_t_2 = import_socket(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 15, __pyx_L1_error)
8167
-
8168
- /* "wepoll/_wepoll.pyx":301
8182
+ /* "wepoll/_wepoll.pyx":298
8169
8183
  *
8170
8184
  * # Recasts so that my Cyright extension doesn't misbehave
8171
8185
  * cdef PyTime_round_t PyTime_ROUND_TIMEOUT = _PyTime_ROUND_TIMEOUT # <<<<<<<<<<<<<<
@@ -8174,7 +8188,7 @@ __Pyx_RefNannySetupContext("PyInit__wepoll", 0);
8174
8188
  */
8175
8189
  __pyx_v_6wepoll_7_wepoll_PyTime_ROUND_TIMEOUT = _PyTime_ROUND_TIMEOUT;
8176
8190
 
8177
- /* "wepoll/_wepoll.pyx":302
8191
+ /* "wepoll/_wepoll.pyx":299
8178
8192
  * # Recasts so that my Cyright extension doesn't misbehave
8179
8193
  * cdef PyTime_round_t PyTime_ROUND_TIMEOUT = _PyTime_ROUND_TIMEOUT
8180
8194
  * cdef PyTime_round_t PyTime_ROUND_FLOOR = _PyTime_ROUND_FLOOR # <<<<<<<<<<<<<<
@@ -8183,7 +8197,7 @@ __Pyx_RefNannySetupContext("PyInit__wepoll", 0);
8183
8197
  */
8184
8198
  __pyx_v_6wepoll_7_wepoll_PyTime_ROUND_FLOOR = _PyTime_ROUND_FLOOR;
8185
8199
 
8186
- /* "wepoll/_wepoll.pyx":303
8200
+ /* "wepoll/_wepoll.pyx":300
8187
8201
  * cdef PyTime_round_t PyTime_ROUND_TIMEOUT = _PyTime_ROUND_TIMEOUT
8188
8202
  * cdef PyTime_round_t PyTime_ROUND_FLOOR = _PyTime_ROUND_FLOOR
8189
8203
  * cdef PyTime_round_t PyTime_ROUND_UP = _PyTime_ROUND_UP # <<<<<<<<<<<<<<
@@ -8192,7 +8206,7 @@ __Pyx_RefNannySetupContext("PyInit__wepoll", 0);
8192
8206
  */
8193
8207
  __pyx_v_6wepoll_7_wepoll_PyTime_ROUND_UP = _PyTime_ROUND_UP;
8194
8208
 
8195
- /* "wepoll/_wepoll.pyx":304
8209
+ /* "wepoll/_wepoll.pyx":301
8196
8210
  * cdef PyTime_round_t PyTime_ROUND_FLOOR = _PyTime_ROUND_FLOOR
8197
8211
  * cdef PyTime_round_t PyTime_ROUND_UP = _PyTime_ROUND_UP
8198
8212
  * cdef PyTime_round_t PyTime_ROUND_CEILING = _PyTime_ROUND_CEILING # <<<<<<<<<<<<<<
@@ -8201,7 +8215,7 @@ __Pyx_RefNannySetupContext("PyInit__wepoll", 0);
8201
8215
  */
8202
8216
  __pyx_v_6wepoll_7_wepoll_PyTime_ROUND_CEILING = _PyTime_ROUND_CEILING;
8203
8217
 
8204
- /* "wepoll/_wepoll.pyx":305
8218
+ /* "wepoll/_wepoll.pyx":302
8205
8219
  * cdef PyTime_round_t PyTime_ROUND_UP = _PyTime_ROUND_UP
8206
8220
  * cdef PyTime_round_t PyTime_ROUND_CEILING = _PyTime_ROUND_CEILING
8207
8221
  * cdef PyTime_round_t PyTime_ROUND_HALF_EVEN = _PyTime_ROUND_HALF_EVEN # <<<<<<<<<<<<<<
@@ -8210,159 +8224,159 @@ __Pyx_RefNannySetupContext("PyInit__wepoll", 0);
8210
8224
  */
8211
8225
  __pyx_v_6wepoll_7_wepoll_PyTime_ROUND_HALF_EVEN = _PyTime_ROUND_HALF_EVEN;
8212
8226
 
8213
- /* "wepoll/_wepoll.pyx":451
8227
+ /* "wepoll/_wepoll.pyx":464
8214
8228
  * raise
8215
8229
  *
8216
8230
  * cpdef uintptr_t fileno(self): # <<<<<<<<<<<<<<
8217
8231
  * """Return the file descriptor number of the control fd.
8218
8232
  * on windows this recasts the handle to a `uintptr_t` to a
8219
8233
  */
8220
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_3fileno, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_fileno, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error)
8221
- __Pyx_GOTREF(__pyx_t_3);
8222
- if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_fileno, __pyx_t_3) < 0) __PYX_ERR(0, 451, __pyx_L1_error)
8223
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8234
+ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_3fileno, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_fileno, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
8235
+ __Pyx_GOTREF(__pyx_t_2);
8236
+ if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_fileno, __pyx_t_2) < 0) __PYX_ERR(0, 464, __pyx_L1_error)
8237
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8224
8238
 
8225
- /* "wepoll/_wepoll.pyx":458
8239
+ /* "wepoll/_wepoll.pyx":471
8226
8240
  *
8227
8241
  *
8228
8242
  * cpdef object close(self): # <<<<<<<<<<<<<<
8229
8243
  * """Close the control file descriptor of the epoll object.
8230
8244
  *
8231
8245
  */
8232
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_5close, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_close, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error)
8233
- __Pyx_GOTREF(__pyx_t_3);
8234
- if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_close, __pyx_t_3) < 0) __PYX_ERR(0, 458, __pyx_L1_error)
8235
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8246
+ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_5close, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_close, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
8247
+ __Pyx_GOTREF(__pyx_t_2);
8248
+ if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_close, __pyx_t_2) < 0) __PYX_ERR(0, 471, __pyx_L1_error)
8249
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8236
8250
 
8237
- /* "wepoll/_wepoll.pyx":473
8251
+ /* "wepoll/_wepoll.pyx":486
8238
8252
  * self.closed = True
8239
8253
  *
8240
8254
  * cpdef object register(self, object fd, unsigned int eventmask): # <<<<<<<<<<<<<<
8241
8255
  * cdef epoll_event ev
8242
8256
  * cdef SOCKET _fd
8243
8257
  */
8244
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_7register, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_register, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error)
8245
- __Pyx_GOTREF(__pyx_t_3);
8246
- if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_register, __pyx_t_3) < 0) __PYX_ERR(0, 473, __pyx_L1_error)
8247
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8258
+ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_7register, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_register, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
8259
+ __Pyx_GOTREF(__pyx_t_2);
8260
+ if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_register, __pyx_t_2) < 0) __PYX_ERR(0, 486, __pyx_L1_error)
8261
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8248
8262
 
8249
- /* "wepoll/_wepoll.pyx":486
8263
+ /* "wepoll/_wepoll.pyx":499
8250
8264
  * raise
8251
8265
  *
8252
8266
  * cpdef object modify(self, object fd, unsigned int eventmask): # <<<<<<<<<<<<<<
8253
8267
  * """Modify a registered file descriptor.
8254
8268
  *
8255
8269
  */
8256
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_9modify, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_modify, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error)
8257
- __Pyx_GOTREF(__pyx_t_3);
8258
- if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_modify, __pyx_t_3) < 0) __PYX_ERR(0, 486, __pyx_L1_error)
8259
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8270
+ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_9modify, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_modify, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
8271
+ __Pyx_GOTREF(__pyx_t_2);
8272
+ if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_modify, __pyx_t_2) < 0) __PYX_ERR(0, 499, __pyx_L1_error)
8273
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8260
8274
 
8261
- /* "wepoll/_wepoll.pyx":513
8275
+ /* "wepoll/_wepoll.pyx":526
8262
8276
  * raise
8263
8277
  *
8264
8278
  * cpdef object unregister(self, object fd): # <<<<<<<<<<<<<<
8265
8279
  * """
8266
8280
  * Remove a registered file descriptor from the epoll object.
8267
8281
  */
8268
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_11unregister, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_unregister, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error)
8269
- __Pyx_GOTREF(__pyx_t_3);
8270
- if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_unregister, __pyx_t_3) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
8271
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8282
+ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_11unregister, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_unregister, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)
8283
+ __Pyx_GOTREF(__pyx_t_2);
8284
+ if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_unregister, __pyx_t_2) < 0) __PYX_ERR(0, 526, __pyx_L1_error)
8285
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8272
8286
 
8273
- /* "wepoll/_wepoll.pyx":538
8287
+ /* "wepoll/_wepoll.pyx":551
8274
8288
  * raise
8275
8289
  *
8276
8290
  * cpdef list poll(self, object timeout = None, int maxevents = -1): # <<<<<<<<<<<<<<
8277
8291
  * """
8278
8292
  * Wait for events. timeout in seconds (float)
8279
8293
  */
8280
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_13poll, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_poll, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error)
8281
- __Pyx_GOTREF(__pyx_t_3);
8282
- __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[0]);
8283
- if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_poll, __pyx_t_3) < 0) __PYX_ERR(0, 538, __pyx_L1_error)
8284
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8294
+ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_13poll, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_poll, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
8295
+ __Pyx_GOTREF(__pyx_t_2);
8296
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0]);
8297
+ if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_poll, __pyx_t_2) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
8298
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8285
8299
 
8286
- /* "wepoll/_wepoll.pyx":617
8300
+ /* "wepoll/_wepoll.pyx":630
8287
8301
  * return elist
8288
8302
  *
8289
8303
  * def __enter__(self): # <<<<<<<<<<<<<<
8290
8304
  * return self
8291
8305
  *
8292
8306
  */
8293
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_15__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll___enter, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error)
8294
- __Pyx_GOTREF(__pyx_t_3);
8295
- if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_3) < 0) __PYX_ERR(0, 617, __pyx_L1_error)
8296
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8307
+ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_15__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll___enter, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error)
8308
+ __Pyx_GOTREF(__pyx_t_2);
8309
+ if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_2) < 0) __PYX_ERR(0, 630, __pyx_L1_error)
8310
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8297
8311
 
8298
- /* "wepoll/_wepoll.pyx":620
8312
+ /* "wepoll/_wepoll.pyx":633
8299
8313
  * return self
8300
8314
  *
8301
8315
  * def __exit__(self, *args): # <<<<<<<<<<<<<<
8302
8316
  * self.close()
8303
8317
  *
8304
8318
  */
8305
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_17__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll___exit, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error)
8306
- __Pyx_GOTREF(__pyx_t_3);
8307
- if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_3) < 0) __PYX_ERR(0, 620, __pyx_L1_error)
8308
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8319
+ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_17__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll___exit, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
8320
+ __Pyx_GOTREF(__pyx_t_2);
8321
+ if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_2) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
8322
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8309
8323
 
8310
- /* "wepoll/_wepoll.pyx":626
8324
+ /* "wepoll/_wepoll.pyx":639
8311
8325
  * self.close()
8312
8326
  *
8313
8327
  * @classmethod # <<<<<<<<<<<<<<
8314
8328
  * def fromfd(cls, object fd):
8315
8329
  * cdef epoll poll = cls.__new__(cls)
8316
8330
  */
8317
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_21fromfd, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_fromfd, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error)
8318
- __Pyx_GOTREF(__pyx_t_3);
8319
- if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_fromfd, __pyx_t_3) < 0) __PYX_ERR(0, 626, __pyx_L1_error)
8320
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8321
- __Pyx_GetNameInClass(__pyx_t_3, (PyObject*)__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_fromfd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error)
8331
+ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_21fromfd, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll_fromfd, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
8332
+ __Pyx_GOTREF(__pyx_t_2);
8333
+ if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_fromfd, __pyx_t_2) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
8334
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8335
+ __Pyx_GetNameInClass(__pyx_t_2, (PyObject*)__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_fromfd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
8336
+ __Pyx_GOTREF(__pyx_t_2);
8337
+ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 639, __pyx_L1_error)
8322
8338
  __Pyx_GOTREF(__pyx_t_3);
8323
- __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error)
8324
- __Pyx_GOTREF(__pyx_t_4);
8339
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8340
+ if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_fromfd, __pyx_t_3) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
8325
8341
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8326
- if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6wepoll_7_wepoll_epoll, __pyx_mstate_global->__pyx_n_u_fromfd, __pyx_t_4) < 0) __PYX_ERR(0, 626, __pyx_L1_error)
8327
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8328
8342
 
8329
8343
  /* "(tree fragment)":1
8330
8344
  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8331
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling"
8345
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling"
8332
8346
  * def __setstate_cython__(self, __pyx_state):
8333
8347
  */
8334
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_23__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 1, __pyx_L1_error)
8335
- __Pyx_GOTREF(__pyx_t_4);
8336
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
8337
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8348
+ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_23__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 1, __pyx_L1_error)
8349
+ __Pyx_GOTREF(__pyx_t_3);
8350
+ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
8351
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8338
8352
 
8339
8353
  /* "(tree fragment)":3
8340
8354
  * def __reduce_cython__(self):
8341
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling"
8355
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling"
8342
8356
  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8343
- * raise TypeError, "self.handle cannot be converted to a Python object for pickling"
8357
+ * raise TypeError, "self.handle,self.socket_api cannot be converted to a Python object for pickling"
8344
8358
  */
8345
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_25__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 3, __pyx_L1_error)
8346
- __Pyx_GOTREF(__pyx_t_4);
8347
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
8348
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8359
+ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6wepoll_7_wepoll_5epoll_25__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_epoll___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_wepoll__wepoll, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3, __pyx_L1_error)
8360
+ __Pyx_GOTREF(__pyx_t_3);
8361
+ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
8362
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8349
8363
 
8350
8364
  /* "wepoll/_wepoll.pyx":1
8351
8365
  * # cython: freethreading = True # <<<<<<<<<<<<<<
8352
8366
  * cimport cython
8353
8367
  * from cpython.exc cimport (PyErr_CheckSignals, PyErr_SetFromErrno,
8354
8368
  */
8355
- __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
8356
- __Pyx_GOTREF(__pyx_t_4);
8357
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
8358
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8369
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
8370
+ __Pyx_GOTREF(__pyx_t_3);
8371
+ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
8372
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8359
8373
 
8360
8374
  /*--- Wrapped vars code ---*/
8361
8375
 
8362
8376
  goto __pyx_L0;
8363
8377
  __pyx_L1_error:;
8378
+ __Pyx_XDECREF(__pyx_t_2);
8364
8379
  __Pyx_XDECREF(__pyx_t_3);
8365
- __Pyx_XDECREF(__pyx_t_4);
8366
8380
  if (__pyx_m) {
8367
8381
  if (__pyx_mstate->__pyx_d && stringtab_initialized) {
8368
8382
  __Pyx_AddTraceback("init wepoll._wepoll", __pyx_clineno, __pyx_lineno, __pyx_filename);
@@ -8393,11 +8407,11 @@ __Pyx_RefNannySetupContext("PyInit__wepoll", 0);
8393
8407
 
8394
8408
  typedef struct {
8395
8409
  const char *s;
8396
- #if 63 <= 65535
8410
+ #if 79 <= 65535
8397
8411
  const unsigned short n;
8398
- #elif 63 / 2 < INT_MAX
8412
+ #elif 79 / 2 < INT_MAX
8399
8413
  const unsigned int n;
8400
- #elif 63 / 2 < LONG_MAX
8414
+ #elif 79 / 2 < LONG_MAX
8401
8415
  const unsigned long n;
8402
8416
  #else
8403
8417
  const Py_ssize_t n;
@@ -8474,12 +8488,13 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = {
8474
8488
  {__pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_ex */
8475
8489
  {__pyx_k_register, sizeof(__pyx_k_register), 0, 1, 1}, /* PyObject cname: __pyx_n_u_register */
8476
8490
  {__pyx_k_self, sizeof(__pyx_k_self), 0, 1, 1}, /* PyObject cname: __pyx_n_u_self */
8477
- {__pyx_k_self_handle_cannot_be_converted, sizeof(__pyx_k_self_handle_cannot_be_converted), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_self_handle_cannot_be_converted */
8491
+ {__pyx_k_self_handle_self_socket_api_cann, sizeof(__pyx_k_self_handle_self_socket_api_cann), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_self_handle_self_socket_api_cann */
8478
8492
  {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */
8479
8493
  {__pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_setstate */
8480
8494
  {__pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_setstate_cython */
8481
8495
  {__pyx_k_sizehint, sizeof(__pyx_k_sizehint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sizehint */
8482
8496
  {__pyx_k_sock_family, sizeof(__pyx_k_sock_family), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sock_family */
8497
+ {__pyx_k_sock_fd, sizeof(__pyx_k_sock_fd), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sock_fd */
8483
8498
  {__pyx_k_sock_timeout, sizeof(__pyx_k_sock_timeout), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sock_timeout */
8484
8499
  {__pyx_k_sock_type, sizeof(__pyx_k_sock_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sock_type */
8485
8500
  {__pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_stringsource */
@@ -8498,13 +8513,13 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, c
8498
8513
 
8499
8514
  static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
8500
8515
  CYTHON_UNUSED_VAR(__pyx_mstate);
8501
- __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 353, __pyx_L1_error)
8502
- __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_OSError); if (!__pyx_builtin_OSError) __PYX_ERR(0, 399, __pyx_L1_error)
8503
- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 436, __pyx_L1_error)
8504
- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 446, __pyx_L1_error)
8505
- __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(0, 571, __pyx_L1_error)
8506
- __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 586, __pyx_L1_error)
8507
- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0, 613, __pyx_L1_error)
8516
+ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 368, __pyx_L1_error)
8517
+ __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_OSError); if (!__pyx_builtin_OSError) __PYX_ERR(0, 406, __pyx_L1_error)
8518
+ __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 443, __pyx_L1_error)
8519
+ __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 453, __pyx_L1_error)
8520
+ __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(0, 584, __pyx_L1_error)
8521
+ __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 599, __pyx_L1_error)
8522
+ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0, 626, __pyx_L1_error)
8508
8523
  return 0;
8509
8524
  __pyx_L1_error:;
8510
8525
  return -1;
@@ -8516,14 +8531,14 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
8516
8531
  CYTHON_UNUSED_VAR(__pyx_mstate);
8517
8532
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
8518
8533
 
8519
- /* "wepoll/_wepoll.pyx":538
8534
+ /* "wepoll/_wepoll.pyx":551
8520
8535
  * raise
8521
8536
  *
8522
8537
  * cpdef list poll(self, object timeout = None, int maxevents = -1): # <<<<<<<<<<<<<<
8523
8538
  * """
8524
8539
  * Wait for events. timeout in seconds (float)
8525
8540
  */
8526
- __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, Py_None, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 538, __pyx_L1_error)
8541
+ __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, Py_None, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 551, __pyx_L1_error)
8527
8542
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
8528
8543
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);
8529
8544
  __Pyx_RefNannyFinishContext();
@@ -8571,47 +8586,47 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
8571
8586
  PyObject* tuple_dedup_map = PyDict_New();
8572
8587
  if (unlikely(!tuple_dedup_map)) return -1;
8573
8588
  {
8574
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 451, 13};
8589
+ const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 464, 13};
8575
8590
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
8576
8591
  __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_fileno, __pyx_k_A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
8577
8592
  }
8578
8593
  {
8579
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 458, 55};
8594
+ const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 471, 55};
8580
8595
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
8581
8596
  __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_close, __pyx_k_A_4t1_T_wb_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
8582
8597
  }
8583
8598
  {
8584
- const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 473, 69};
8599
+ const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 486, 72};
8585
8600
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fd, __pyx_mstate->__pyx_n_u_eventmask};
8586
- __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_register, __pyx_k_A_4_S_nAQ_A_xq_4uA_E_b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
8601
+ __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_register, __pyx_k_A_4_S_d_1_A_xq_4uA_E_b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
8587
8602
  }
8588
8603
  {
8589
- const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 486, 69};
8604
+ const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 499, 72};
8590
8605
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fd, __pyx_mstate->__pyx_n_u_eventmask};
8591
- __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_modify, __pyx_k_A_4_S_nAQ_A_xq_4uA_E_b_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
8606
+ __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_modify, __pyx_k_A_4_S_d_1_A_xq_4uA_E_b_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
8592
8607
  }
8593
8608
  {
8594
- const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 513, 53};
8609
+ const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 526, 56};
8595
8610
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fd};
8596
- __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_unregister, __pyx_k_A_4_S_nAQ_4uA_E_b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
8611
+ __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_unregister, __pyx_k_A_4_S_d_1_4uA_E_b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
8597
8612
  }
8598
8613
  {
8599
- const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 538, 406};
8614
+ const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 551, 406};
8600
8615
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_timeout, __pyx_mstate->__pyx_n_u_maxevents};
8601
8616
  __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_poll, __pyx_k_B_D_q_q_87_q_9_RRTTU_iq_a_q_s_H, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
8602
8617
  }
8603
8618
  {
8604
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 617, 7};
8619
+ const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 630, 7};
8605
8620
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
8606
8621
  __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_enter, __pyx_k_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
8607
8622
  }
8608
8623
  {
8609
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 620, 9};
8624
+ const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 633, 9};
8610
8625
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args};
8611
8626
  __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_exit, __pyx_k_A_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
8612
8627
  }
8613
8628
  {
8614
- const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 626, 43};
8629
+ const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 639, 43};
8615
8630
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_fd, __pyx_mstate->__pyx_n_u_poll};
8616
8631
  __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_wepoll__wepoll_pyx, __pyx_mstate->__pyx_n_u_fromfd, __pyx_k_A_XQa_4v_6auBa_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
8617
8632
  }
@@ -11190,15 +11205,15 @@ __PYX_GOOD:
11190
11205
  }
11191
11206
 
11192
11207
  /* TypeImport */
11193
- #ifndef __PYX_HAVE_RT_ImportType_3_1_3
11194
- #define __PYX_HAVE_RT_ImportType_3_1_3
11195
- static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject *module, const char *module_name, const char *class_name,
11196
- size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_3 check_size)
11208
+ #ifndef __PYX_HAVE_RT_ImportType_3_1_4
11209
+ #define __PYX_HAVE_RT_ImportType_3_1_4
11210
+ static PyTypeObject *__Pyx_ImportType_3_1_4(PyObject *module, const char *module_name, const char *class_name,
11211
+ size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_4 check_size)
11197
11212
  {
11198
11213
  PyObject *result = 0;
11199
11214
  Py_ssize_t basicsize;
11200
11215
  Py_ssize_t itemsize;
11201
- #if CYTHON_COMPILING_IN_LIMITED_API
11216
+ #ifdef Py_LIMITED_API
11202
11217
  PyObject *py_basicsize;
11203
11218
  PyObject *py_itemsize;
11204
11219
  #endif
@@ -11211,7 +11226,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject *module, const char *module
11211
11226
  module_name, class_name);
11212
11227
  goto bad;
11213
11228
  }
11214
- #if !CYTHON_COMPILING_IN_LIMITED_API
11229
+ #ifndef Py_LIMITED_API
11215
11230
  basicsize = ((PyTypeObject *)result)->tp_basicsize;
11216
11231
  itemsize = ((PyTypeObject *)result)->tp_itemsize;
11217
11232
  #else
@@ -11249,7 +11264,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject *module, const char *module
11249
11264
  module_name, class_name, size, basicsize+itemsize);
11250
11265
  goto bad;
11251
11266
  }
11252
- if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_3 &&
11267
+ if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_4 &&
11253
11268
  ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
11254
11269
  PyErr_Format(PyExc_ValueError,
11255
11270
  "%.200s.%.200s size changed, may indicate binary incompatibility. "
@@ -11257,7 +11272,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject *module, const char *module
11257
11272
  module_name, class_name, size, basicsize, basicsize+itemsize);
11258
11273
  goto bad;
11259
11274
  }
11260
- else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_3 && (size_t)basicsize > size) {
11275
+ else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_4 && (size_t)basicsize > size) {
11261
11276
  if (PyErr_WarnFormat(NULL, 0,
11262
11277
  "%.200s.%.200s size changed, may indicate binary incompatibility. "
11263
11278
  "Expected %zd from C header, got %zd from PyObject",
@@ -11427,6 +11442,7 @@ static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
11427
11442
  return -1;
11428
11443
  }
11429
11444
  mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
11445
+ Py_DECREF(bases);
11430
11446
  if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
11431
11447
  return -1;
11432
11448
  }
@@ -14890,6 +14906,10 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt
14890
14906
  PyCode_NewWithPosOnlyArgs
14891
14907
  #endif
14892
14908
  (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
14909
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
14910
+ if (likely(result))
14911
+ result->_co_firsttraceable = 0;
14912
+ #endif
14893
14913
  return result;
14894
14914
  }
14895
14915
  #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY