
H/\c           @@ s  d  Z  d d l m Z m Z d d l Z d d l Z d d l Z d d l m	 Z	 y d d l
 m Z d   Z
 Wnc e k
 r e	 j r d d l Z d e f d     YZ d	   Z
 d
   Z q d   Z d   Z
 n Xd d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z e e k Z g  Z y e Wn' e k
 rvd e f d     YZ n Xd e f d     YZ  e  d  Z  d   Z! d   Z" d   Z# d e f d     YZ$ d e% f d     YZ& d e f d     YZ' e& d e f e( e' j)   Z' d  e f d!     YZ* d" e f d#     YZ+ d$ e f d%     YZ, d& e f d'     YZ- d( e f d)     YZ. d* e f d+     YZ/ d, e f d-     YZ0 d. e f d/     YZ1 d0 e f d1     YZ2 d2 e f d3     YZ3 d S(4   sb   
Useful base classes for watchers. The available
watchers will depend on the specific event loop.
i    (   t   absolute_importt   print_functionN(   t   config(   t   get_object_tracebackc         C@ s   |  S(   N(    (   t   init(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   tracemalloc   s    t   _TBc           B@ s    e  Z d Z d   Z d   Z RS(   t   linesc         C@ s&   g  | D] } | j    ^ q |  _ d  S(   N(   t   rstripR   (   t   selfR   t   x(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   __init__   s    c         C@ s   |  j  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   format!   s    (   R   (   t   __name__t
   __module__t	   __slots__R   R   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR      s   	c         @ s"   t  j      f d    } | S(   Nc         @ s)     |  | |  t  t j    |  _ d  S(   N(   R   t	   tracebackt   format_stackt   _captured_malloc(   R	   t   argst   kwargs(   R   (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   traces%   s    (   t	   functoolst   wraps(   R   R   (    (   R   s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   $   s    c         C@ s   |  j  S(   N(   R   (   t   obj(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   +   s    c         C@ s   d  S(   N(   t   None(   t   _obj(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   /   s    c         C@ s   |  S(   N(    (   R   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   2   s    (   t   fsencode(   t   _dbg(   t   GEVENT_DEBUG_LEVEL(   t   DEBUG(   t   GEVENT_CORE_EVENTS(   t   _NOARGSt   ResourceWarningc           B@ s   e  Z d  Z RS(   s   Python 2 fallback(   R   R   t   __doc__(    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR!   F   s   t   _NoWatcherResultc           B@ s   e  Z d    Z RS(   c         C@ s   d S(   Ns   <NoWatcher>(    (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   __repr__K   s    (   R   R   R$   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR#   I   s   c         C@ s{   g  } xI | D]A \ } } | } |  | @rD | j  |  |  | @}  n  |  s Pq q W|  rn | j  t |    n  d j |  S(   Nt   |(   t   appendt   hext   join(   t   event_fieldt
   all_eventst   resultt   flagt   stringt   c_flag(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   events_to_strP   s    
c         @ s"   t  j      f d    } | S(   Nc         @ s,   |  j  r t d   n    |  | |  d  S(   Ns   not while active(   t   activet
   ValueError(   R	   R   R   (   t   func(    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   nw_   s    	(   R   R   (   R2   R3   (    (   R2   s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   not_while_active^   s    c         @ s"   t  j      f d    } | S(   Nc         @ s   |  j  r   |   St S(   N(   t   _watcherR#   (   R	   (   R2   (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   if_wg   s    	
(   R   R   (   R2   R6   (    (   R2   s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   only_if_watcherf   s    t   LazyOnClassc           B@ s,   e  Z e d     Z d d  Z d   Z RS(   c         C@ s   |  |  | | j  <d S(   sC   Put a LazyOnClass object in *cls_dict* with the same name as *func*N(   R   (   t   clst   cls_dictR2   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   lazyq   s    c         C@ s   | p | j  |  _ | |  _ d  S(   N(   R   t   nameR2   (   R	   R2   R<   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   v   s    c         C@ s6   | d  k r |  S|  j |  } t | |  j |  | S(   N(   R   R2   t   setattrR<   (   R	   t   instt   klasst   val(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   __get__z   s
    N(   R   R   t   classmethodR;   R   R   RA   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR8   o   s   t   AbstractWatcherTypec           B@ sD   e  Z d  Z d Z d Z d   Z e d    Z d   Z	 d   Z
 RS(   s   
    Base metaclass for watchers.

    To use, you will:

    - subclass the watcher class defined from this type.
    - optionally subclass this type
    c         C@ sj   | d k r2 | j  d  r2 |  j | | |  n  d | k rT t rT t d   n  t j |  | | |  S(   Nt   watchert   _watcher_skip_ffit   __del__s-   CFFI watchers are not allowed to have __del__(   t   gett   _fill_watchert   ALLOW_WATCHER_DELt	   TypeErrort   typet   __new__(   R9   R<   t   basesR:   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRL      s
    c         @ s  | j  d  r | d  } n  t d  } | j d  pC | d |  } d | k rm | d | } | | d <n2 | d j |  s | d | d } | | d <n  | d     f d   } t j | |  | j d    s| j d	  p| d	 | t  pd
 } | | f  n   f d   }	 t j | |	  | j d  pW| d | t  pWd   f d   }
 t j | |
  d   } x@ d D]8 } d | } | | k rt j | | | |   qqWd  S(   Nt   _ic         S@ sR   x6 | D]. } y t  | |   SWq t k
 r4 q q Xq W| rN t |    n  d  S(   N(   t   getattrt   AttributeError(   t   attrRM   t   errort   b(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _mro_get   s    t   _watcher_prefixt   _watcher_typet
   _is_activec         @ s   t  |  j    S(   N(   RO   t   _LIB(   R	   (   t   active_name(    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _watcher_is_active   s    t   _watcher_struct_namet   _watcher_struct_patterns	   struct %sc         @ s   |  j  j   d  S(   Ns    *(   t   _FFIt   typeof(   R	   (   t   watcher_struct_name(    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _watcher_struct_pointer_type   s    t   _watcher_callback_namet   _gevent_generic_callbackc         @ s   |  j  j |  j    S(   N(   R]   t	   addressofRX   (   R	   (   t   callback_name(    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _watcher_callback   s    c         @ s     f d   } | | _  | S(   Nc         @ s!   |  j  d   } t |  j |  S(   NRN   (   RV   RO   RX   (   R	   t   lib_name(   R<   (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   meth   s    (   R   (   R<   t   watcher_nameRg   (    (   R<   s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt
   _make_meth   s    	t   startt   stopR   R5   (   Rj   Rk   R   t	   _watcher_(   t   endswitht   TrueRG   t
   startswithR8   R;   t   False(   R9   R<   RM   R:   RT   RU   t   watcher_typeRZ   t   watcher_struct_patternR`   Re   Ri   t	   meth_nameRh   (    (   RY   Rd   R_   s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRH      s>    
	
c         C@ s   |  j  j |  S(   N(   R]   t
   new_handle(   R9   R   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRt      s    c         C@ s   |  j  j |  S(   N(   R]   t   new(   R9   t   kind(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRu      s    N(   R   R   R"   R   R]   RX   RL   RB   RH   Rt   Ru   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRC      s   	B	RD   c           B@ s  e  Z d! Z d! Z d! Z d! Z e e d! e	 d    Z
 d   Z e d    Z d   Z d   Z d   Z d   Z d   Z d   Z d	   Z d
   Z d   Z d   Z d   Z d! Z d! Z d! Z d! Z d! Z d! Z d! Z d   Z  d   Z! d   Z" d   Z# e$ rd   Z% n  d   Z& e' d    Z( d   Z) e' d    Z* d   Z+ d   Z, e' e+ e,  Z- d   Z. d   Z/ e' e. e/  Z0 d   Z1 d   Z2 d   Z3 e4 d    Z5 e' e3 e5  Z6 e' d    Z7 e' d     Z8 RS("   c         C@ s2   | |  _  | |  _ | |  _ | |  _ |  j   d  S(   N(   t   loopt   _watcher__init_priorityt   _watcher__init_argst   _watcher__init_reft   _watcher_full_init(   R	   t   _loopt   reft   priorityR   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR      s
    				c         C@ s|   |  j  } |  j } |  j } |  j |  | d  k	 rD |  j |  n  y |  j |  Wn d  |  _   n X|  j |  d  S(   N(	   Rx   Rz   Ry   t   _watcher_createR   t   _watcher_ffi_set_priorityt   _watcher_ffi_initR5   t   _watcher_ffi_set_init_ref(   R	   R~   R}   R   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR{      s    				c         C@ s   d  S(   N(    (   R9   t   ffi_watcher(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _watcher_ffi_close  s    c         C@ s   |  j    |  _ d  S(   N(   t   _watcher_newR5   (   R	   R}   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    c         C@ s   t  |   j |  j  S(   N(   RK   Ru   R`   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    c         C@ s   d  S(   N(    (   R	   R}   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    c         C@ s   d  S(   N(    (   R	   R~   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    c         C@ s   t     d  S(   N(   t   NotImplementedError(   R	   R   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    c         C@ s   t     d  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _watcher_ffi_start  s    c         C@ s   |  j  |  j j |  j  d  S(   N(   t   _watcher_stopRw   t   _ptrR5   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _watcher_ffi_stop!  s    c         C@ s   t     d  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _watcher_ffi_ref$  s    c         C@ s   t     d  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _watcher_ffi_unref'  s    c         C@ s   |  j    d  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _watcher_ffi_start_unref*  s    c         C@ s   |  j    d  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _watcher_ffi_stop_ref1  s    c         C@ s_   |  j  d  k r d  S|  j   |  j  } d  |  _  |  j | |  j j  |  j |  d  |  _ d  S(   N(   R5   R   Rk   t   _watcher_set_dataR]   t   NULLR   Rw   (   R	   R5   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   closeI  s    
		c         C@ s   | | _  | S(   N(   t   data(   R	   t   the_watcherR   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   T  s    	c         C@ s   |  S(   N(    (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt	   __enter__[  s    c         C@ s   |  j    d  S(   N(   R   (   R	   t   tt   vt   tb(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   __exit__^  s    c         C@ st   |  j  rp t |   } d } | d  k	 rI d j | j    } d | } n  t j d |  | f t  |  j   n  d  S(   Nt    s   
s   
Traceback:
s   Failed to close watcher %r%s(	   R5   R   R   R(   R   t   warningst   warnR!   R   (   R	   R   t   tb_msg(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRF   b  s    	c         C@ s+  |  j    } d |  j j t |   | f } |  j rA | d 7} n  |  j d  k	 r t |  j d d   } | |  k r | d |  j j 7} q | d |  j f 7} n  |  j d  k	 r | d |  j f 7} n  |  j d  k r |  j d  k r | d 7} n  | d |  j	 7} | d	 |  j
 7} | d
 |  j 7} | d S(   Ns   <%s at 0x%x%ss    pendingt   __self__s#    callback=<bound method %s of self>s    callback=%rs    args=%rs    stoppeds    watcher=%ss
    handle=%ss    ref=%st   >(   t   _formatt	   __class__R   t   idt   pendingt   callbackR   RO   R   R5   t   _watcher_handleR}   (   R	   t   formatsR+   t   fself(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR$   p  s"    	c         C@ s   |  j  r |  j  j Sd  S(   N(   R5   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    	c         C@ s   d S(   NR   (    (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    c         C@ s   t     d  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR}     s    c         C@ s   |  j  S(   N(   t	   _callback(   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _get_callback  s    c         C@ sc   t  |  r/ | d  k	 r/ t d | f   n  | d  k rV d |  j k r_ |  ` q_ n	 | |  _ d  S(   Ns   Expected callable, not %rR   (   t   callableR   RJ   t   __dict__R   (   R	   t   cb(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _set_callback  s    c         C@ s   |  j  S(   N(   t   _args(   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt	   _get_args  s    c         C@ s_   t  | t  r+ | d  k	 r+ t d   n  | d  k rR d |  j k r[ |  ` q[ n	 | |  _ d  S(   Ns   args must be a tuple or NoneR   (   t
   isinstancet   tupleR   RJ   R   R   (   R	   R   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt	   _set_args  s    c         G@ s   | d  k r t d   n  | |  _ | p- t |  _ |  j j j |   |  j |  j	 t
 |   j |    |  _ |  j   |  j   d  S(   Ns#   callback must be callable, not None(   R   RJ   R   R    R   Rw   t   _keepalivesett   addR   R5   RK   Rt   t   _handleR   R   (   R	   R   R   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRj     s    	'
c         C@ s   |  j  d  k r: |  j d  k s6 |  |  j j k s6 t  d  S|  j   |  j   |  j j j |   d  |  _ |  j	 |  j
 |  j j  d  |  _ d  |  _ d  S(   N(   R   R   Rw   R   t   AssertionErrorR   R   t   discardR   R   R5   R]   R   R   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRk     s    '

		c         C@ s   d  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _get_priority  s    c         C@ s   d  S(   N(    (   R	   R~   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _set_priority  s    c         C@ s)   |  j  d  k	 r% |  j |  j   r% t St S(   N(   R5   R   RZ   Rn   Rp   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR0     s    !c         C@ s   t  S(   N(   Rp   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    N(9   R   R   R   R   R   R5   R   R   Rn   R    R   R{   RB   R   R   R   R   R   R   R   R   R   R   R   R   RV   t   _watcher_initt   _watcher_startR   R`   Re   RZ   R   R   R   R   RI   RF   R$   t   propertyR   R   R}   R   R   R   R   R   R   Rj   Rk   R   R4   R   R~   R0   R   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRD      sb   																								
		t   IoMixinc           B@ s2   e  Z d  Z e d d d  Z d   Z d   Z RS(   i    c      	   C@ s   | d k  r t  d |   n  | |  j @r@ t  d |   n  | |  _ t t |   j | d | d | d | py | | f d  S(   Ni    s   fd must be non-negative: %rs   illegal event mask: %rR}   R~   R   (   R1   t
   EVENT_MASKt   _fdt   superR   R   (   R	   Rw   t   fdt   eventsR}   R~   R   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    	!c         O@ sH   | p	 t  } | j d  r+ t f | } n  t t |   j | |  d  S(   Nt   pass_events(   R    RG   R   R   R   Rj   (   R	   R   R   R   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRj     s    c         C@ s   d |  j  S(   Ns    fd=%d(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    N(   R   R   R   Rn   R   R   Rj   R   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s   	t
   TimerMixinc           B@ s5   e  Z d  Z d d e d d  Z d   Z d   Z RS(   t   timerg        c      	   C@ sc   | d k  r t  d |   n  | |  _ | |  _ t t |   j | d | d | d | | f d  S(   Ng        s#   repeat must be positive or zero: %rR}   R~   R   (   R1   t   _aftert   _repeatR   R   R   (   R	   Rw   t   aftert   repeatR}   R~   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s
    		c         O@ sK   | j  d |  j j  } | r. |  j j   n  t t |   j | |  d  S(   Nt   update(   RG   Rw   t#   starting_timer_may_update_loop_timet
   update_nowR   R   Rj   (   R	   R   R   t   kwR   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRj     s    c         O@ s   t     d  S(   N(   R   (   R	   R   R   R   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   again
  s    N(   R   R   RV   Rn   R   R   Rj   R   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s   	t   SignalMixinc           B@ s   e  Z d  Z e d d  Z RS(   t   signalc         C@ sf   | d k  s | t  j k r. t d |   n  | |  _ t t |   j | d | d | d | f d  S(   Ni   s   illegal signal number: %rR}   R~   R   (   t   signalmodulet   NSIGR1   t
   _signalnumR   R   R   (   R	   Rw   t	   signalnumR}   R~   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    	N(   R   R   RV   Rn   R   R   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s   t	   IdleMixinc           B@ s   e  Z d  Z RS(   t   idle(   R   R   RV   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s   t   PrepareMixinc           B@ s   e  Z d  Z RS(   t   prepare(   R   R   RV   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   !  s   t
   CheckMixinc           B@ s   e  Z d  Z RS(   t   check(   R   R   RV   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   %  s   t	   ForkMixinc           B@ s   e  Z d  Z RS(   t   fork(   R   R   RV   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   )  s   t
   AsyncMixinc           B@ s&   e  Z d  Z d   Z e d    Z RS(   t   asyncc         C@ s   t     d  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   send0  s    c         C@ s   t     d  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   3  s    (   R   R   RV   R   R   R   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   -  s   	t
   ChildMixinc           B@ s_   e  Z e Z d  e d  Z d   Z e d    Z e d    Z d Z
 d  Z e d    Z RS(   i    c         C@ sc   | j  s t d   n  | j   | |  _ |  j r_ t t |   j | d | d | | f n  d  S(   Ns5   child watchers are only available on the default loopR}   R   (   t   defaultRJ   t   install_sigchldt   _pidt   _CALL_SUPER_INITR   R   R   (   R	   Rw   t   pidt   traceR}   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   =  s    	
		c         C@ s   d |  j  |  j f S(   Ns    pid=%r rstatus=%r(   R   t   rstatus(   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   E  s    c         C@ s   |  j  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   H  s    c         C@ s   |  j  S(   N(   t   _rpid(   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   rpidL  s    c         C@ s   |  j  S(   N(   t   _rstatus(   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   T  s    N(   R   R   Rn   R   R   R   R   R   R   R   R   R   R   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   8  s   	t	   StatMixinc           B@ se   e  Z e d     Z d e d d  Z e d    Z e d    Z	 e d    Z
 e d    Z RS(   c         C@ s
   t  |   S(   N(   R   (   t   path(    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   _encode_pathZ  s    g        c      	   C@ st   |  j  |  |  _ | |  _ |  j j d |  j  |  _ | |  _ t t |   j	 | d | d | d |  j | f d  S(   Ns   char[]R}   R~   R   (
   R   t   _pathst   _pathR]   Ru   t   _cpatht	   _intervalR   R   R   (   R	   R|   R   t   intervalR}   R~   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   ^  s    			!c         C@ s   |  j  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   s  s    c         C@ s
   t   d  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyRQ   w  s    c         C@ s
   t   d  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   prev{  s    c         C@ s   |  j  S(   N(   R   (   R	   (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR     s    N(   R   R   t   staticmethodR   Rn   R   R   R   R   RQ   R   R   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyR   X  s   (4   R"   t
   __future__R    R   R   R   R   R   t   gevent._configR   R   R   t   ImportErrort   trace_mallocR   t   objectR   t   gevent._compatR   t   gevent._ffiR   R   R   t   gevent._ffi.loopR   R    RI   t   __all__R!   t	   NameErrort   Warningt   intR#   R/   R4   R7   R8   RK   RC   RD   t   dictR   R   R   R   R   R   R   R   R   R   R   (    (    (    s2   lib/python2.7/site-packages/gevent/_ffi/watcher.pyt   <module>   s^   	
						] 