
NWc           @@  s  d  d l  m Z d  d l Z e j d e d e d e d e d e d e d	 e d
 e d e  	d  d l Z d  d l Z d  d l 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 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 m Z d d l m Z d d l m Z m Z m Z d d l m Z d d l m Z d   Z d   Z d   Z d e j  e j! f d      YZ" d!   Z# e j$ d" d#  Z% e d$ d% d& d' d( d)  Z& e j$ d*  Z' d S(+   i    (   t   absolute_importNt   Namingt   Optionst
   PyrexTypest	   TypeSlotst   errort   warningt   py_object_typet   UtilityCodet   EncodedStringi   (   t   CPtrType(   t   Future(   t   Annotate(   t   Code(   R   (   t   Nodes(   R   (   R   (   R   (   R   R   (   R   i   (   t   open_new_filet   replace_suffixt   decode_filename(   R   (   R	   c         C@  s   |  j  j   |  S(   N(   t   scopet   check_c_classes_pxd(   t   module_node(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   check_c_declarations_pxd!   s    c         C@  s   |  j  j   |  j  j   |  S(   N(   R   t   check_c_classest   check_c_functions(   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   check_c_declarations&   s    c         C@  sJ   t  j s | j r t } n	 | j } t j d | d |  j d d | j  S(   Nt   emit_linenumst   emit_code_commentst   c_line_in_traceback(   R   t   annotatet   FalseR   R   t   CCodeConfigt
   directivesR   (   t   envt   optionsR   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   generate_c_code_config,   s    			t
   ModuleNodec           B@  sj  e  Z d  g 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 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+   Z0 d,   Z1 d-   Z2 d.   Z3 d/   Z4 d0   Z5 d1   Z6 d2   Z7 d3   Z8 d4   Z9 d5   Z: d6   Z; d7   Z< d8   Z= d9   Z> d:   Z? d;   Z@ d<   ZA d=   ZB d>   ZC d?   ZD d@   ZE dA   ZF dB   ZG dC   ZH dD   ZI dE   ZJ dF   ZK dG   ZL dH   ZM dI   ZN dJ   ZO dK   ZP dL   ZQ dM   ZR dN   ZS dO   ZT dP   ZU dQ   ZV dR   ZW dS   ZX dT   ZY dU   ZZ dV   Z[ dW   Z\ dX   Z] i dY dZ 6dZ d[ 6Z^ d\   Z_ d]   Z` d^   Za d_   Zb RS(a   t   bodyc         C@  s  t  |  j t j  s t  t  | t j  rF |  j j j | j  n |  j j j |  |  j j	 j | j	  d   } | |  j j
 | j
  | |  j j | j  | |  j j | j  | r	x3 | j D]( } |  j | j _ t | j j j d <q W|  j j |  n  d  S(   Nc         S@  s1   x* | D]" } | |  k r |  j  |  q q Wd  S(   N(   t   append(   t   L1t   L2t   x(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   extend_if_not_inW   s    t   internal(   t
   isinstanceR$   R   t   StatListNodet   AssertionErrort   statst   extendR%   R   t   utility_code_listt   include_filest   included_filest   python_include_filest   c_class_entriest   full_module_namet   typet   module_namet   TrueR   t   merge_in(   t   selft   treeR   t   merge_scopeR)   t   entry(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR9   F   s    		
c         C@  s   |  j  r |  j  d | _ n  t j s8 d  | _ |  _ nx t j r t d t j	 |  j
   | _ |  j d  k	 r t | j d |  j  | _ |  j j | j _ q n |  j | _ |  j  | _  |  j j |  d  S(   Nt   old_style_globalsu   File: %s (starting at line %s)u   
(   R   R>   R   t
   docstringst   Nonet   doct   embed_pos_in_docstringR	   R   t   relative_positiont   post   encodingR$   t   analyse_declarations(   R:   R    (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRF   i   s    			c         C@  s&   |  j  } | j r" |  j |  n  d  S(   N(   R   t   has_import_start*   create_import_star_conversion_utility_code(   R:   R    (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   prepare_utility_codex   s    		c         C@  s~   |  j  } t j | _ g  |  _ |  j | |  j i   |  j |  |  j | | |  |  j | | |  |  j	 | | |  d  S(   N(
   R   R   t   c_void_typet   return_typet   referenced_modulest   find_referenced_modulest   sort_cdef_classest   generate_c_codet   generate_h_codet   generate_api_code(   R:   R!   t   resultR    (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   process_implementation   s    		c         C@  s9   x2 |  j  D]' } x | j D] } | j r d Sq Wq
 Wd S(   Ni   i    (   RL   t   cfunc_entriest   defined_in_pxd(   R:   t   moduleR=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   has_imported_c_functions   s
    	c         C@  sM  d d d  } | | j  d d } | | j  } | | j  } | | j  } | si | si | si | rIt | j d  | _ t j   }	 t	 | |  }
 t j
 |	 |  |
  | j r t | j d  | _ t j | j  } n d  } |	 j   t j |  j |  } |	 j |  |	 j d  |  j | |	  | j rN|  j | g  |	  n  |	 j d  t j |  j |  } |	 j d |  |	 j d  |  j |	  |	 j d  |  j |	  | r|	 j d  x@ | D]5 } |  j | j |	  | r|  j | j |  qqWn  | rF|	 j d  x$ | D] } |  j | |	 |  q&Wn  | r|	 j d  x$ | D] } |  j | |	 |  q`Wn  |	 j d  |	 j d	 |  |	 j d  |	 j d
  |	 j d | j  |	 j d  |	 j d | j  |	 j d  |	 j d  |	 j d	 |  t  | j  } z |	 j! |  Wd  | j"   Xn  d  S(   Ni    c         S@  sD   g  |  D]9 } | j  d k s: | r+ | j s: | r | j r | ^ q S(   Nt   public(   t
   visibilityt   apiRU   (   t   entriesRZ   t   pxdR=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt	   h_entries   s    RZ   i   s   .hs   .pxit    s
   #ifndef %ss   #endif /* !%s */s   #if PY_MAJOR_VERSION < 3s   PyMODINIT_FUNC init%s(void);s   #elses   PyMODINIT_FUNC PyInit_%s(void);s   #endif(#   t   type_entriest   var_entriesRT   R4   R   t   c_filet   h_fileR   t   CCodeWriterR"   t   GlobalStatet   generate_pxit   i_filet   PyrexCodeWriterR@   t   put_generated_byR   t   h_guard_prefixt   api_namet   put_h_guardt   putlnt   generate_type_header_codet   capi_reexport_cincludest   generate_includest   api_guard_prefixt"   generate_extern_c_macro_definitiont   generate_dl_import_macrot   generate_cclass_header_codeR6   t   generate_cclass_include_codet   generate_public_declarationR7   R   t   copytot   close(   R:   R    R!   RR   R]   t   h_typest   h_varst   h_funcst   h_extension_typest   h_codet   c_code_configt   i_codet   h_guardt	   api_guardR=   t   f(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRP      sp    	
	c         C@  sb   | j  d t j | j j | j d d f  | r^ | j  d | j j | j d d  n  d  S(   Ns   %s %s;t   dll_linkaget	   DL_IMPORTs   cdef extern %st   pyrexi   (   Rl   R   t   extern_c_macroR6   t   declaration_codet   cname(   R:   R=   R|   R~   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRu      s    			c         C@  s   | j  j d d  S(   Nt   .t   __(   t   qualified_namet   replace(   R:   R    (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRj      s    c         C@  s  d d  } | | j   } | | j  } | | j  } | sK | sK | rt | j d  | _ t j   } t | |  }	 t j	 | |  |	  | j
   t j |  j |  }
 | j |
  | j d  | j r | j d t j j | j   n  | rU| j d  xK | D]@ } | j } | j d | j  | j d | j | j f  qWn  | r| j d  xl | D]a } t | j  } | j t j | j  } | j d	 | j |   | j d
 | j | f  qoWn  | rY| j d  xl | D]a } t | j  } | j t j | j  } | j d	 | j |   | j d | j | f  qWn  | j t j d d  d  | j t j d d  d  | r| j t j d d  d  n  | r| j t j d d  d  n  | r| j t j d d  d  n  | j d  | j d |  j |   | j d  | j d | j   | j d  xR | D]J } | j t j | j  } | j j!   } | j d | j | | f  qaWxR | D]J } | j t j | j  } | j j"   } | j d | j | | f  qW| j d  x. | D]& } |  j# | j | d | j j  qW| j d  | j d  | j d  | j d  | j d  | j d  | j d |
  t$ | j  } z | j% |  Wd  | j&   Xn  d  S(    Ni    c         S@  s/   g  |  D]$ } | j  s% | r | j r | ^ q S(   N(   RZ   RU   (   R[   R\   R=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   api_entries   s    s   _api.hs   #include "Python.h"s   #include "%s"R^   s   static PyTypeObject *%s = 0;s   #define %s (*%s)s   static %s = 0;s   #define %s %st   PyIdentifierFromStrings   ImportExport.ct   ModuleImporti   t   VoidPtrImportt   FunctionImportt
   TypeImports   static int import_%s(void) {s   PyObject *module = 0;s"   module = __Pyx_ImportModule("%s");s   if (!module) goto bad;sQ   if (__Pyx_ImportFunction(module, "%s", (void (**)(void))&%s, "%s") < 0) goto bad;sH   if (__Pyx_ImportVoidPtr(module, "%s", (void **)&%s, "%s") < 0) goto bad;s   Py_DECREF(module); module = 0;s   if (!%s) goto bad;s	   return 0;s   bad:s   Py_XDECREF(module);s
   return -1;t   }s   #endif /* !%s */('   R`   RT   R4   R   Ra   t   api_fileR   Rc   R"   Rd   Rh   R   Rp   Rj   Rk   Rl   Rb   t   ost   patht   basenameR6   t   typeptr_cnamet   typeobj_cnameR
   t   manglet   func_prefix_apit   nameR   t   varptr_prefix_apit   putR   t   load_as_stringR   t   signature_stringt   empty_declaration_codet   generate_type_import_callR   Rv   Rw   (   R:   R    R!   RR   R   t   api_varst	   api_funcst   api_extension_typesR|   R}   R   R=   R6   R   t   sigR   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRQ      s    
	#		!!   	c         C@  s0   | j  d t j t j d d  | j f  d  S(   Ns	   %s %s %s;t   PyTypeObjectR   (   Rl   R   R   R   t   public_declR   (   R:   R6   R|   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRs   1  s    	c         C@  s   | j  d | j | j f  | j   | j j } | rs xD | D], } | j  d | j j | j d d  q@ Wn | j  d  | j	   d  S(   Ns   cdef extern class %s.%s:s   cdef %sR   i   t   pass(
   Rl   R7   R   t   indentR   R`   R6   R   R   t   dedent(   R:   R6   R~   R`   R=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRt   7  s    	
	$c         C@  s  |  j  } t j s | j r* t j   } n t j   } t | |  } t j | |  d | d | j	 } | j
   | d } |  j | | | | j |  |  j | _ |  j | _ | j t  | d }	 |	 j d |  j  |	 j d t j |  j j d d  f  |	 j d	  |	 j d
 | j  | d }	 |  j | |	  |  j | |	  |  j | |	  |  j j | |	  |	 j d   |  j | |	  |  j  | |	  | j! r|  j" | |	  n  |  j# | |	  |  j$ | d  | | d  |  j% | | d  t j& r|  j' | | d  n  |  j( | d  |  j) | | |  | j* d  x | j+ D] }
 | j |
  qTW| j,   t- | j.  } z | j/ |  Wd  | j0   Xd | _1 | j2 r|  j3 | |  n  t j s| j r|  j4 | | |  n  d  S(   Nt   code_configt   common_utility_include_dirR|   t   before_global_vars   #define __Pyx_MODULE_NAME "%s"s   int %s%s = 0;R   R   R^   s   /* Implementation of '%s' */t   all_the_restit   init_modulet   cleanup_modulet   main_methodt   filename_tables   
i   (5   RL   R   R   R   t   AnnotationCCodeWriterR   Rc   R"   Rd   R   t   initialize_main_c_codet   generate_module_preamblet   embedded_metadataRD   t
   module_posR   t   use_utility_codet   refnanny_utility_codeRl   R5   R   t   module_is_mainR   R   t   generate_cached_builtins_declst   generate_lambda_definitionst   generate_variable_definitionsR$   t   generate_function_definitionst   mark_posR@   t   generate_typeobj_definitionst   generate_method_tableRG   t   generate_import_start   generate_pymoduledef_structt   generate_module_init_funct   generate_module_cleanup_funct   embedt   generate_main_methodt   generate_filename_tablet!   generate_declarations_for_modulest   writeR0   t   finalize_main_c_codeR   Ra   Rv   Rw   t   c_file_generatedt	   gdb_debugt   _serialize_lineno_mapt   _generate_annotations(   R:   R    R!   RR   t   modulest
   rootwriterR}   t   globalstateR|   t   codet   utilcodeR   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRO   D  sd    		


)
		
		c         C@  s  |  j  |  t j p | j } | r t j j |  r y d d  l j j } Wn# t	 k
 rr d d  l
 j j } n X| j |  j   } x& | j   D] } d  | _ q Wn d  } | j | j | j d | |  j j s d  S|  j j j } t j j t j j | j   }	 x|  j j D] }
 t j j t j j |	 |
   } t j j |  } | j |	  shqn  | |
 d |  j d t } | sqn  | |	 k rt j j |  ry t j |  Wqt k
 r} d d  l  } | j  | j! k r  qqXn  | j | | d | qWd  S(   Ni    t   coverage_xmlR^   t   include("   R   R   t   annotate_coverage_xmlR   R   t   existst   xml.etree.cElementTreet   etreet   cElementTreet   ImportErrort   xml.etree.ElementTreet   ElementTreet   parset   getroott   getiteratorR@   t   tailt   save_annotationt   main_source_fileRa   R   R2   t   contextt   search_include_directoriest   abspatht   dirnamet   joint
   startswithRD   R8   t   makedirst   OSErrort   errnot   EEXIST(   R:   R   RR   R!   t   coverage_xml_filenamet   ETR   t   elt   search_include_filet
   target_dirt   included_filet   target_filet   target_file_dirt   source_filet   eR   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR     s@    !!c   
      C@  s   | j  j } | j j   } i  } xF t |  D]8 \ } } | d k r. | j | g   j | d  q. q. W| j d  xi t | j	    D]U \ } } i d j
 t t |   d 6t |  d 6}	 | j d |	  | j d  q W| j d  | j   d  S(   Ni    i   t   LineNumberMappingt    t	   c_linenost   cython_linenot
   LineNumber(   R   t   gdb_debug_outputwritert   buffert
   allmarkerst	   enumeratet
   setdefaultR%   t   startt   sortedt   itemsR   t   mapt   strt   endt	   serialize(
   R:   R    t   ccodewritert   tbt   markerst   dt   c_linenoR   R   t   attrs(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR     s    $c         C@  sQ   | | k rM d | | <x$ | j  D] } |  j | | |  q  W| j |  n  d  S(   Ni   (   t   cimported_modulesRM   R%   (   R:   R    t   module_listt   modules_seent   imported_module(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRM     s
    
c         C@  s   g  } x t  |  D] \ } } | | } t   } | }	 xH |	 r |	 j j }
 |
 sW Pn  | |
  } | j |  | j |  }	 q; W| | _ xN t |  D]3 } | | } | | j k r | j | |  Pq q W| j	 |  q W| S(   N(
   R  t   setR6   t	   base_typet   addt   gett	   base_keyst   ranget   insertR%   (   R:   t	   type_dictt
   type_ordert   getkeyt	   type_listt   it   keyt	   new_entryt	   hierarchyt   baseR  t   base_keyt   jR=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   sort_types_by_inheritance  s(    
			
c         C@  s  i  g  } } i  g  } } x}| D]u} x | j  D] } | j r1 | j r1 | j }	 |	 j }
 |
 sh q1 n  |
 | k r d d l m } t | j |  s t	 t
 | j    t | |
 j |  s t	 t
 | |
 j    q | | |
 <| j |
  q1 q1 W| | k } x | j D] } | j r| s/| j r| j }	 |	 j r| j r| j }	 |	 j }
 |
 | k sut	 |
   | | |
 <| j |
  qqqWq! Wd   } |  j | | |  } d   } |  j | | |  } | | f S(   Ni   (   t   NonManglingModuleScopec         S@  s   |  j  S(   N(   t   vtabstruct_cname(   t
   entry_type(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR(    s    c         S@  s   |  j  S(   N(   t   objstruct_cname(   R)  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR*    s    (   R4   t   usedt   in_cincludeR6   R(  R   R'  R+   R   R-   R  R%   R_   RU   t   is_extension_typeR*  R&  (   R:   R  R    t	   vtab_dictt   vtab_dict_ordert   vtabslot_dictt   vtabslot_dict_orderRV   R=   R6   R   R'  t   all_defined_hereR(  t	   vtab_listR*  t   vtabslot_list(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   sort_type_hierarchy  s@    		'2
			
		c         C@  s   t  j d  } i  g  } } xO | j D]D } | | j  } | | k sS t |   | | | <| j |  q& W|  j | | |  | j (d  S(   NR*  (   t   operatort
   attrgetterR4   R6   R-   R%   R&  (   R:   R    t   key_funct
   entry_dictt   entry_orderR=   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRN     s    
c         C@  sP  x! | D] } |  j  | j |  q Wt |  } x | D] } | | k }	 |	 r[ | j }
 n3 g  }
 x* | j D] } | j rk |
 j |  qk qk Wg  |
 D] } | | k r | ^ q }
 |  j |
 |  q7 Wx1 | D]) } |  j | j |  |  j | |  q WxN | D]F } |  j | |  |  j	 | |  |  j
 | |  |  j | |  qWd  S(   N(   t!   generate_objstruct_predeclarationR6   R  R_   RU   R%   Rm   t   generate_objstruct_definitiont   generate_typeobj_predeclarationt   generate_exttype_vtable_structt$   generate_exttype_vtabptr_declarationt*   generate_exttype_final_methods_declaration(   R:   R    R   R3  R4  R   R=   t   vtabslot_entriesRV   t
   definitionR_   t   t(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   generate_type_definitions"  s*    	%c         C@  s3  | d } | j  d  | j  d  d g  | D] } | j ^ q. k r} | j  d  | j  d  | j  d  | j  d  n  |  j | |  \ } } |  j | | | | |  | d	 } xt | D]l }	 |	 | k }
 | j  d  | j  d
 |	 j  |  j |	 | |
  |  j |	 | |
  |  j |	 | |
  q Wd  S(   Nt   type_declarationsR^   s   /*--- Type declarations ---*/s   cpython.arrays   #ifndef _ARRAYARRAY_Hs   struct arrayobject;s'   typedef struct arrayobject arrayobject;s   #endift   module_declarationss#   /* Module declarations from '%s' */(   Rl   R   R5  RD  t   generate_c_class_declarationst   generate_cvariable_declarationst   generate_cfunction_declarations(   R:   R    R   R   t   typecodet   mR3  R4  t
   modulecodeRV   t   defined_here(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR   ;  s&    
"
c         C@  s!   | j  t j | d  d  d  S(   Ns   ModuleSetupCode.ci   (   R   R   R   (   R:   R   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   _put_setup_codeR  s    c         C@  s  | j    | r\ | j d  | j t j | d d d t  | j d  | j d  n  | j d  x" | j D] } | j d |  qs W| j d	  | j d
  | j d  | j d  | j d  | j d j d  d d l m } | j d | j	 d d   |  j
 | d  | j j j rB|  j
 | d  n |  j
 | d  |  j
 | d  | j rd t j t j f } n d } | j d t j t j t j | f  | j d  t j | j j k r| j d  | j d  n | j d  | j d  | j d   | j d  |  j |  | j d  | j d! t j |  j |   | j d! t j |  j |   |  j | | |  | j d  | j d"  | j d#  | j d   | j d  | j d$ r$| j d  | j d%  | j d&  | j d   | j d  n  | j t j  d' d(  d)  | j d* }	 | j d+ }
 |	 d? k r|
 rt! |  j" d.  n  | j d/ t# |
 d0 k   |
 d1 k r| j d2  n | j d3  | j d4 |
  |	 d- k rd5 } n |	 j$   } | j d6 |  | j d7 |  | j t j  d8 d9  d)  t% j& j' |  t% j& j( |  t% j) j( |  | j t* j+  | j d  | j d: | j,  | j d: | j-  | j d: t j.  | j d: t j/  | j d: t j0  | j d: t j1  t2 j3 d  k	 r#| j d: t j5  n  | j d; t j  | j d< t j  | j d= t j6 t j7 f  | j d> t j  d  S(@   Ns   /* BEGIN: Cython MetadataR   i   t	   sort_keyss   END: Cython Metadata */R^   s   #define PY_SSIZE_T_CLEANs   #include "%s"s   #ifndef Py_PYTHON_Hsg       #error Python headers needed to compile C extensions, please install development version of Python.sb   #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)s6       #error Cython requires Python 2.6+ or Python 3.2+.s   #elseR  s   #endif /* Py_PYTHON_H */i   (   t   __version__s   #define CYTHON_ABI "%s"R   t   _t   CModulePreamblet   CppInitCodet	   CInitCodet   MathInitCodes	   %s = %s; sj   
#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
  %s = %s[f_index]; %s = lineno; %sgoto Ln_error; \
}
s   
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
sE     #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)sL     #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)sA     #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)sH     #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)s   #endifs
   #define %ss   #ifdef PYREX_WITHOUT_ASSERTIONSs!   #define CYTHON_WITHOUT_ASSERTIONSt   ccomplexs   #if !defined(CYTHON_CCOMPLEX)s   #define CYTHON_CCOMPLEX 1t   UtilityFunctionPredeclarationss   ModuleSetupCode.ci    t   c_string_typet   c_string_encodingt   bytest	   bytearraysG   a default encoding must be provided if c_string_type is not a byte types1   #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII %st   asciit   defaults2   #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 1s2   #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0s*   #define __PYX_DEFAULT_STRING_ENCODING "%s"t	   ByteArrays7   #define __Pyx_PyObject_FromString __Pyx_Py%s_FromStringsE   #define __Pyx_PyObject_FromStringAndSize __Pyx_Py%s_FromStringAndSizet   TypeConversionss   TypeConversion.cs   static PyObject *%s;s   static int %s;s   static int %s = 0;s   static const char * %s= %s;s   static const char *%s;(   s   bytess	   bytearray(8   Rh   Rl   t   jsont   dumpsR8   R3   R   R^   RP  R   RN  R   R!   t   cplusR   R   t   clineno_cnamet   line_c_macroR   t   filename_cnamet   filetable_cnamet   lineno_cnameR   t   divisiont   future_directivesRq   Ri   Rj   Rp   Ro   R   R   R   R   RD   t   intt   titleR   t   c_long_typet   create_to_py_utility_codet   create_from_py_utility_codet
   c_int_typeR   t   branch_prediction_macrost   module_cnamet   module_dict_cnamet   builtins_cnamet   empty_tuplet   empty_bytest   empty_unicodeR   t
   pre_importR@   t   preimport_cnamet   cfilenm_cnamet   file_c_macro(   R:   R    R!   R  t   metadataR   t   filenameRP  t   cinfoRX  RY  t   c_string_func_name(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR   U  s    
"	 !!	c         C@  st   t  j } | j d |  | j d  | j d |  | j d  | j d |  | j d  | j d  d  S(   Ns
   #ifndef %ss     #ifdef __cpluspluss       #define %s extern "C"s     #elses       #define %s externs     #endifs   #endif(   R   R   Rl   (   R:   R   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRq     s    	c         C@  s+   | j  d  | j  d  | j  d  d  S(   Ns   #ifndef DL_IMPORTs     #define DL_IMPORT(_T) _Ts   #endif(   Rl   (   R:   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRr     s    c         C@  s|   g  } xb | j  D]W } t |  } | d d k rV | d d k rV | j d |  q | j d |  q W| j d  d  S(   Ni    t   <it   >s   #include %ss   #include "%s"s   #include <omp.h>(   R1   R  Rl   t   putln_openmp(   R:   R    R  R   t   includesR|  t   byte_decoded_filenname(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRo     s     c         C@  sq  d d  l  j } | j |  j j d    } | j | j |  j j j	     d } | t
 |   } | j t j    t j } | j |  r | } n  | j d  | j d t j  | j j rSx | j j D]{ } | j | j	    } | j |  r| t
 |  }	 n | j |  }	 |	 j d d  j d d  }
 | j d	 |
  q Wn | j d
  | j d  d  S(   Ni    R   R^   s   static const char *%s[] = {s   \s   \\t   "s   \"s   "%s",t   0s   };(   t   os.pathR   R   R5   t   splitt   splitextR   t   compilation_sourcet   source_desct   get_filenametable_entryt   lenR   t   getcwdt   sepR   Rl   R   Rf  R   t   filename_listR   R   (   R:   R   R   t   full_module_patht   module_abspatht	   root_patht   workdirR  t   file_abspathR|  t   escaped_filename(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR     s(    	c         C@  s   d  S(   N(    (   R:   R    R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   generate_type_predeclarations  s    c         C@  s  x | D] } | j  s | j } | j r+ q | j s= | j rP |  j | |  q | j r{ | j r{ |  j | j j |  q | j	 r |  j
 | |  q q q Wx | D] } | j  s | j } | j r |  j | |  qw| j r |  j | |  qw| j r|  j | |  qw| j r<| j r<|  j | j j |  qw| j rX|  j | |  qw| j	 rw|  j | |  qwq q Wd  S(   N(   R,  R6   t
   is_typedeft   is_struct_or_uniont   is_cpp_classt$   generate_struct_union_predeclarationt	   is_ctupleR+  t   struct_entryR-  R;  t   generate_typedeft   is_enumt   generate_enum_definitiont    generate_struct_union_definitiont   generate_cpp_class_definitionR<  (   R:   R_   R   R=   R6   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRm      s4    											c         C@  s|   | j  d  xh | j D]] } | j } | j s | j } | j d  rT | d } n | } | j  d | | f  q q Wd  S(   NR^   t   __pyx_i   s!   typedef struct %s __pyx_gcc33_%s;(   Rl   R4   R6   t   typedef_flagR*  R   (   R:   R    R   R=   R6   R   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   generate_gcc33_hack"  s    				c         C@  sz   | j  j } | j rC y | j d } WqI t k
 r? | } qI Xn | } | j | j  | j d | j | j	   d  S(   Nt   numeric_typedefss   typedef %s;(
   R6   t   typedef_base_typet
   is_numericR   t   KeyErrorR   RD   Rl   R   R   (   R:   R=   R   R  t   writer(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  0  s    	c         C@  s2   | j  r  d | | | | | f Sd | | f Sd  S(   Ns   %s %s;
typedef %s %s %s;s   %s %s;(   R  (   R:   R6   t   kindR   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   sue_predeclaration<  s
    	c         C@  sz   | j  } | j rT | j rT | j d d j g  | j D] } | j   ^ q4   n  | j |  j | | j | j   d  S(   Ns   template <typename %s>s   , typename (	   R6   R  t	   templatesRl   R   R   R  R  R   (   R:   R=   R   R6   t   T(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  D  s
    	*c         C@  s    d | | f } d } | | f S(   Ns   %s %s {s   };(    (   R:   R6   R  R   t   headert   footer(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   sue_header_footerK  s    c         C@  s  | j  | j  | j } | j } | r| j } | j o@ | j } | ro d | j d f } | j j t	  n  |  j
 | | | j  \ } } | r | j d  | j d  | j d  | j d  | j d  n  | j |  | j }	 |	 st | j d  n  x. |	 D]& }
 | j d	 |
 j j |
 j   qW| j |  | r| j d  | j d
  | j d  | j d  | j d  qn  d  S(   Ns   %s %st   __Pyx_PACKEDs   #if defined(__SUNPRO_C)s     #pragma pack(1)s   #elif !defined(__GNUC__)s     #pragma pack(push, 1)s   #endifsO   Empty struct or union definition not allowed outside a 'cdef extern from' blocks   %s;s     #pragma pack()s     #pragma pack(pop)(   R   RD   R6   R   R  t	   is_structt   packedR   R   t   packed_struct_utility_codeR  R   Rl   R`   R   R   (   R:   R=   R   R6   R   R  R  R  R  R`   t   attr(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  P  s<    				c         C@  s  | j  | j  | j } | j } | r| j rj | j d d j g  | j D] } | j   ^ qJ   n  | j d | j	  | j
 r d j g  | j
 D] } | j   ^ q  } | j d |  n  | j d  t } t }	 x | j D] }
 |
 j j r|
 j j r| j d  n1 |
 j j rH|
 j d k rH| j d	  t } n  |
 j	 d
 d k rdt }	 n  | j d |
 j j |
 j	   q W| r|	 r| j d | j	  n  | j d  n  d  S(   Ns   template <class %s>s   , class s	   struct %ss	   , public s    : public %ss    {s   static s   <init>s   virtual i    t   ~s   %s;s   virtual ~%s() { }s   };(   R   RD   R6   R   R  Rl   R   R   R   R   t   base_classesR   R`   t   is_cfunctiont   is_static_methodR   R8   R   (   R:   R=   R   R6   R   R  t
   base_classt   base_class_declt   has_virtual_methodst   has_destructorR  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  q  s6    			*	%		$c         C@  s]  | j  | j  | j } | j p. | j p. d } |  j | d |  \ } } | j |  | j } | s{ t | j d  n | d } x0 | D]( }	 |	 j	 d  k	 r |	 j	 j |  q q Wxk | D]c }	 |	 j	 d  k r |	 j }
 n d |	 j |	 j	 j   f }
 |	 | k	 r|
 d 7}
 n  | j |
  q W| j |  | j j rY| j d | | f  n  d  S(   NR^   t   enumsD   Empty enum definition not allowed outside a 'cdef extern from' blockis   %s = %st   ,s   typedef enum %s %s;(   R   RD   R6   R   R   R  Rl   t   enum_valuesR   t
   value_nodeR@   t   generate_evaluation_codeRR   R  (   R:   R=   R   R6   R   R  R  R  t
   last_entryt   value_entryt
   value_code(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    s0    		
c         C@  s   | j  d  | j j } | r | j d k rd | j rd | j  d t j t j d d  | f  q | j d k r | j  d t j t j d d  | f  q n  d  S(   NR^   t   externs	   %s %s %s;R   R   RX   t	   DL_EXPORT(	   Rl   R6   R   RY   R,  R   R   R   R   (   R:   R=   R   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR=    s    		c         C@  s   | j  s d  S| j | j  | j } | j } |  j |  | j r | j d  | j d | j  | j r | j j r | j d | j j t	 j
 f  n  xA | j D]6 } | j s | j d | j j d | j   q q W| j d  n  d  S(   NR^   s   struct %s {s   struct %s %s;s   %s;s   (*%s)s   };(   R+  R   RD   R6   R   t   specialize_fused_typesR(  Rl   R  R   t   obj_base_cnameRT   t   is_inheritedR   R   (   R:   R=   R   R6   R   t   method_entry(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR>    s"    							+c         C@  sS   | j  s d  S| j | j  | j } | j rO | j d | j | j f  n  d  S(   Ns   static struct %s *%s;(   R+  R   RD   R6   t   vtabptr_cnameRl   R(  (   R:   R=   R   R6   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR?    s    				c         C@  s   | j  s d  S| j | j  | j } xk | j j j D]Z } | j r6 | j r6 | j j | j  } | j	 | j
  } | j d | | f  q6 q6 Wd  S(   Ns   static %s%s;(   R+  R   RD   R6   R   RT   R  t   final_func_cnameR   t   build_function_modifierst   func_modifiersRl   (   R:   R=   R   R6   R  t   declarationt	   modifiers(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR@    s    			c         C@  s0   | j  s d  S| j |  j | d | j   d  S(   Nt   struct(   R   Rl   R  R*  (   R:   R6   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR;    s    	c   	      C@  sw  | j  | j  | j s d  S|  j | d | j  \ } } | j |  | j } | r | j } | d k ru d } n  | j d d | j | t j	 f  n | j d  | j
 r | j o | j j
 r | j d | j | j
 f  n  xL | j j D]> } | j rt } n	 | j } | j d	 | j | j   q W| j |  | j d  k	 rs| j d
 | j | j f  n  d  S(   NR  R   t   PyHeapTypeObjects   %s%s %s;s   struct R^   t   PyObject_HEADs   struct %s *%s;s   %s;s   typedef struct %s %s;(   s   struct R^   (   R   RD   R   R  R*  Rl   R  R  R   R  t   vtabslot_cnameR(  R`   t   is_declared_genericR   R6   R   R   t   objtypedef_cnameR@   (	   R:   R6   R   R  R  R  t   basestruct_cnameR  t	   attr_type(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR<    s>    				
			c         C@  sA   x: | j  D]/ } | s | j r
 | j d | j j  q
 q
 Wd  S(   Ns   static PyTypeObject *%s = 0;(   R4   RU   Rl   R6   R   (   R:   R    R   RB  R=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRG    s    	c   
      C@  s  | j  r d  Sx| j D]} | j s | j s | j d k rW | j pM | j rW q n  d  } d  } d  } | j d k r t j	 } d } nu | j d k r t j	 } | r d } q d } nE | j d k r d } d  } | j
 d  k	 r | j j | j
  } q n  | j } | j }	 | j rZ| rZd } d  } t |  } | j t j | j  }	 d } n  | rt| j d |  n  | j | j |	 d	 |  | d  k	 r| j d
 |  n  | j d  | j |	 k r | j d | j |	 f  q q Wd  S(   Nt   privateR  R   RX   R  t   statici    s   %s R   s    = %st   ;s   #define %s (*%s)(   t   is_cython_builtinR`   R,  t
   in_closureRY   RU   R+  R@   R   R   t   initR6   t   literal_codeR   R
   R   t   varptr_prefixR   R   R   t   put_safeRl   (
   R:   R    R   RB  R=   t   storage_classR   R  R6   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRH  $  sN    	"								c         C@  sO   xH | j  D]= } | j s1 | j d k s1 | j r
 t | | | |  q
 q
 Wd  S(   NRX   (   RT   R+  RY   RZ   t   generate_cfunction_declaration(   R:   R    R   RB  R=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRI  R  s    !c         C@  s   x | j  D] } | j r
 | j d k r
 | j | j j | j   | j d  k	 r} | j j	 | j  } | j
 d |  n  | j d  q
 q
 Wd  S(   NRX   s    = %sR  (   R`   R,  RY   R   R6   R   R   R  R@   R  R  Rl   (   R:   R    R   R=   R  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR   W  s    c         C@  s  | j  } x| j D]y} | j d k r | j } | j } | r|  j | |  |  j | | |  |  j | |  | j   r |  j	 | | |  | j
   r |  j | | |  q n  | j d g  r |  j | |  n  | j d d g  r|  j | |  n  | j d d d g  rYt |  j d d	  | j d
  | j d  | j d  n  | j d d g  r|  j | |  n  | j d d g  r|  j | |  n  | j d d g  r|  j | |  n  | j d g  r|  j | |  n  | j d d g  r|  j | |  n  | j d g  rC|  j | |  n  |  j | |  |  j | |  |  j | |  |  j | | |  qq q Wd  S(   NR  t   __getitem__t   __setitem__t   __delitem__t   __getslice__t   __setslice__t   __delslice__s   __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ insteadi   s   #if PY_MAJOR_VERSION >= 3sN   #error __getslice__, __setslice__, and __delslice__ not supported in Python 3.s   #endift   __getattr__t   __getattribute__t   __setattr__t   __delattr__t   __get__t   __set__t
   __delete__t   __dict__(   R   R4   RY   R6   R   t   generate_exttype_vtablet   generate_new_functiont   generate_dealloc_functiont   needs_gct   generate_traverse_functiont   needs_tp_cleart   generate_clear_functiont   defines_anyt   generate_getitem_int_functiont   generate_ass_subscript_functionR   RD   Rl   t   generate_ass_slice_functiont   generate_getattro_functiont   generate_setattro_functiont   generate_descr_get_functiont   generate_descr_set_functiont   generate_dict_getter_functiont   generate_property_accessorsR   t   generate_getset_tablet   generate_typeobj_definition(   R:   R    R   R5   R=   R6   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR   `  sP    				c         C@  s6   | j  } | j r2 | j d | j | j f  n  d  S(   Ns   static struct %s %s;(   t   parent_typet   vtable_cnameRl   R(  (   R:   R   R   R6   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    s
    			c         C@  s3   | j  } | j d | j d  | j   f  d  S(   Ns   %s = (%s)o;t   p(   R  Rl   R   R   (   R:   R   R   R6   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   generate_self_cast  s
    	c         C@  s  t  j d d  } | j d  } | j } | j } | j   \ } \ }	 }
 } | j j } | j rl g  }	 n  g  | j D] } | j	 j
 rv | ^ qv } | j d  } | s | r | j r | j r d } n d } | r d } n | j j d d  } | j t j  } | j t j  } | j d } | j d |  | j d  | r| j d	 | j j |  | f  | j d
 |  | j d  n  | j d | | | f  | j p|
 p| p|	 p| } | r| j d | j j d   n  | r7t  j | |  } | d  k r#d | j } n  | j d |  n.| j d  | r| j j t j d d   | rud } n d } | j d d t } | j d | | | f  | j d | | f  | j d |  | j d  | j   r| j d  n  | j d  n  | s!| j d  n  | j d  | se| j d  | j d t j  | j d  n  | j d  | r| r| j d  n  | r| j d  | j  d!   n  t! } | j r1| } x" | j r| j j" r| j } qW| | k	 rd" | j" } n d } | j d# | j | | j# f  n  x1 | D]) } | j d$ | j$ | j	 j%   f  q8WxY |	 D]Q } | j& d% k rt } | j' d& | j$ | j$ f  ql| j( | d' d( t! qlWx6 | D]. } | j d) | j$  | j d* | j$  qWx" |
 D] } | j d+ | j$  qW| j$ d, k r>| j d-  n  | r| j r| j rfd. t j } n d/ } t } | j d0 | j) | f  n  | j d1  | r| j d2  | j* d! t+ d( t! | j d3  n  | j d  d  S(4   Nt   tp_newt   __new__R^   s   CYTHON_UNUSED i    t   freelistt   declssI   static PyObject *%s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/s   static %s[%d];s   static int %s = 0;sD   static PyObject *%s(PyTypeObject *t, %sPyObject *a, %sPyObject *k) {s   %s;R  s
   %s->tp_news   PyObject *o = %s(t, a, k);s   PyObject *o;t   IncludeStringHs   StringTools.csH    & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0)t   derefsZ   if (CYTHON_COMPILING_IN_CPYTHON && likely((%s > 0) & (t->tp_basicsize == sizeof(%s))%s)) {s   o = (PyObject*)%s[--%s];s   memset(o, 0, sizeof(%s));s   (void) PyObject_INIT(o, t);s   PyObject_GC_Track(o);s   } else {s:   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {s   o = (*t->tp_alloc)(t, 0);s4   o = (PyObject *) PyBaseObject_Type.tp_new(t, %s, 0);R   s   if (unlikely(!o)) return 0;s   p = %s;t   os   (struct %s*)s   p->%s = %s%s;s   new((void*)&(p->%s)) %s();R  s5   p->%s = PyDict_New(); if (unlikely(!p->%s)) goto bad;s   p->%st   nannys   p->%s.data = NULL;s   p->%s.memview = NULL;s   p->%s.obj = NULL;t   __pyx_memoryviewslices   p->from_slice.memview = NULL;s   o, %s, NULLs   o, a, ks#   if (unlikely(%s(%s) < 0)) goto bad;s	   return o;s   bad:s   return NULL;(,   R   t   ConstructorSlott   mangle_internalR  R  t   get_refcounted_entriest   is_final_typet   is_internalR`   R6   R  t   lookup_heret
   is_specialt   trivial_signatureR   R  R   t   freelist_namet   freecount_nameR   Rl   R   R  t   get_base_slot_functionR@   R   R   R   t   load_cachedR8   R  Rt  t	   cast_codeR   R(  R  R   R   R   R   t   put_init_var_to_py_nonet
   func_cnamet   put_decref_clearR   (   R:   R   R   t   cclass_entryt   tp_slott	   slot_funcR6   R  t   have_entriest   py_attrst
   py_bufferst   memoryview_slicesR  R=   t   cpp_class_attrst   new_func_entryt   unused_markert   freelist_sizeR  R  R  t   need_self_castR
  t   type_safety_checkt
   obj_structt   needs_error_cleanupt   vtab_base_typet   struct_type_castt
   cinit_args(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    s    				
					 									c         C@  sx  t  j d d  } | j d  } | j j } | j |  | k rF d  S| j d  } | j d  | j d |  | j j } | j   } | j	 d  }	 |	 | j
 k r d  }	 n  | j	 d  }
 |
 | j
 k r d  }
 n  | j   \ } \ } } } g  | j
 D] } | j j r | ^ q } | s:| s:| s:|	 s:|
 rM|  j | |  n  | s| j d  | rod } n d	 } | j d
 |  | j d  | j d  | j d  n  | r| j d  n  |  j | |  |	 r| j d  n  |
 r| j d  n  x" | D] } | j d | j  q	Wx4 | D], } | j d | j | j d t d t q.Wx( | D]  } | j d | j d t qeW| r| r| j r| j j   r| j d  q| j d  | j d  | j d  | j d  n  t  j | |  } | d  k	 r&| j d |  qg| j rF| j d | j  qg| j } | j d | | | f  | j j t j d d   n | j j d d  } | rD| j t  j!  } | j t  j"  } | rd } n d  } | j } | j d! | | | j# d d" t | f  | j d# | | | j$ d$  f  | j d%  n  | j d&  | rg| j d  n  | j d  d  S('   Nt
   tp_dealloct   __dealloc__R^   s   static void %s(PyObject *o) {t   __weakref__R  s    #if PY_VERSION_HEX >= 0x030400a1s   !_PyGC_FINALIZED(o)s2   (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))s.   if (unlikely(Py_TYPE(o)->tp_finalize) && %s) {s1   if (PyObject_CallFinalizerFromDealloc(o)) return;R   s   #endifs   PyObject_GC_UnTrack(o);s.   if (p->__weakref__) PyObject_ClearWeakRefs(o);s+   if (p->__dict__) PyDict_Clear(p->__dict__);s   __Pyx_call_destructor(p->%s);s   p->%sR  t   clear_before_decreft   have_gils   PyObject_GC_Track(o);s   #if CYTHON_USE_TYPE_SLOTSs&   if (PyType_IS_GC(Py_TYPE(o)->tp_base))s   %s(o);s   %s->tp_dealloc(o);sJ   if (likely(%s)) %s->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, %s);t   CallNextTpDeallocs   ExtensionTypes.cR  i    sQ    & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0)s^   if (CYTHON_COMPILING_IN_CPYTHON && ((%s < %d) & (Py_TYPE(o)->tp_basicsize == sizeof(%s))%s)) {R  s   %s[%s++] = %s;R  s   } else {s   (*Py_TYPE(o)->tp_free)(o);(%   R   R  R  R  R  t	   slot_codeRl   R  R  R  R`   R@   R  R6   R  R	  t   generate_usr_dealloc_callR   t   put_xdecref_clearR   R8   t   put_xdecref_memoryviewsliceR   R  t   is_builtin_typeR   R   R   R   R  R   R  R   R  R  R   R  (   R:   R   R   R$  R%  R  t   slot_func_cnameR  R  t   weakref_slott	   dict_slotRQ  R'  R)  R=   R*  t   finalised_checkR5  t
   base_cnameR-  R  R  R/  R6   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  *  s    											c         C@  s   | j  d  } | s d  S| j d  | j d  | j d  | j d  | j d | j  | j d  | j d  | j d	  d  S(
   NR6  t   {s   PyObject *etype, *eval, *etb;s!   PyErr_Fetch(&etype, &eval, &etb);s   ++Py_REFCNT(o);s   %s(o);s   --Py_REFCNT(o);s    PyErr_Restore(etype, eval, etb);R   (   R  Rl   R!  (   R:   R   R   R=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR<    s    c         C@  s1  t  j d  } | j d  } | j j } | j |  | k rC d  S| j d  | j d |  | j d t  \ } \ } }	 }
 | s | r | j d  n  | s |	 r |  j	 | |  n  | r`t  j
 | |  } | r | j d |  q`| j r| j } | j d | | f  q`| j } | j d | | | | f  | j j t j d	 d
   n  xc | D][ } d | j } | j d |  | j j rd | } n  | j d |  | j d  qgWxJ |	 D]B } | j d } | j d |  | j d |  | j d  qW| j d  | j d  d  S(   Nt   tp_traverseR^   s2   static int %s(PyObject *o, visitproc v, void *a) {t   include_gc_simples   int e;s!   e = %s(o, v, a); if (e) return e;sL   if (!%s->tp_traverse); else { e = %s->tp_traverse(o,v,a); if (e) return e; }s   e = ((likely(%s)) ? ((%s->tp_traverse) ? %s->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, %s)); if (e) return e;t   CallNextTpTraverses   ExtensionTypes.cs   p->%ss	   if (%s) {s   ((PyObject*)%s)s!   e = (*v)(%s, a); if (e) return e;R   s   .objs   if (p->%s) {s$   e = (*v)(p->%s, a); if (e) return e;s	   return 0;(   R   t   GCDependentSlotR  R  R  R;  Rl   R  R   R	  R  R?  R   R   R   R   R  R   R6   R-  (   R:   R   R   R#  R$  R%  R  R&  R'  R(  R)  t   static_callRD  R=   t   var_codeR   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    sR    !					c         C@  s  t  j d  } | j d  } | j j } | j |  | k rC d  S| j d t  \ } \ } }	 }
 | sv |	 sv | r d } n d } | j d  | j d | | f  | r t	 j
 r | j d  n  | s |	 r |  j | |  n  | rt  j | |  } | r| j d |  q| j rE| j } | j d | | f  q| j } | j d	 | | | | f  | j j t j d
 d   n  t	 j
 rx | D]l } d | j } | j d |  | j r| j | t d t n | j | | j d t | j d  qWn% x" | D] } | j d | j  qWx" |	 D] } | j d | j  q9W| j d k rv| j d  n  | j d  | j d  d  S(   Nt   tp_clearRG  R^   s   CYTHON_UNUSED s   static int %s(%sPyObject *o) {s   PyObject* tmp;s   %s(o);s)   if (!%s->tp_clear); else %s->tp_clear(o);s\   if (likely(%s)) { if (%s->tp_clear) %s->tp_clear(o); } else __Pyx_call_next_tp_clear(o, %s);t   CallNextTpClears   ExtensionTypes.cs   p->%ss   tmp = ((PyObject*)%s);R  s   Py_XDECREF(tmp);s   Py_CLEAR(p->%s);s   Py_CLEAR(p->%s.obj);R  s&   __PYX_XDEC_MEMVIEW(&p->from_slice, 1);s	   return 0;R   (   R   RI  R  R  R  R;  R  R   Rl   R   t   clear_to_noneR	  R  R?  R   R   R   R   R  R   R  t   put_init_to_py_noneR   R6   (   R:   R   R   R#  R$  R%  R  R&  R'  R(  R)  t   unusedRJ  RD  R=   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    sZ    !								c         C@  sl   | j  d | j d   | j  d  | j  d  | j  d  | j  d  | j  d  | j  d  d  S(	   Ns0   static PyObject *%s(PyObject *o, Py_ssize_t i) {t   sq_items   PyObject *r;s4   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;s2   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);s   Py_DECREF(x);s	   return r;R   (   Rl   R  (   R:   R   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  9  s    c         C@  sP  | j  j } | j d  } | j d  } | j d  | j d | j d   | j d  | r{ | j d | j  n@ |  j | d d d	 |  | j d
  | j d  | j d  | j d  | j d  | r | j d | j  n@ |  j | d d d	 |  | j d
  | j d  | j d  | j d  | j d  d  S(   NR  R  R^   s6   static int %s(PyObject *o, PyObject *i, PyObject *v) {t   mp_ass_subscripts   if (v) {s   return %s(o, i, v);t   tp_as_mappings   o, i, vs'   PyErr_Format(PyExc_NotImplementedError,sG     "Subscript assignment not supported by %.200s", Py_TYPE(o)->tp_name);s
   return -1;R   s   else {s   return %s(o, i);sE     "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);(   R  R  R  Rl   R  R!  t   generate_guarded_basetype_call(   R:   R   R   R  t	   set_entryt	   del_entry(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  M  sN    c         C@  s   | r | j  } | rU | j d | | | | | f  | j d | | | | f  q | j d | | f  | j d | | | f  n  d  S(   Ns   if (%s->%s && %s->%s->%s)s     return %s->%s->%s(%s);s   if (%s->%s)s     return %s->%s(%s);(   R   Rl   (   R:   R  t   substructuret   slott   argsR   t   base_tpname(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRT  {  s    	c         C@  sP  | j  j } | j d  } | j d  } | j d  | j d | j d   | j d  | r{ | j d | j  n@ |  j | d d d	 |  | j d
  | j d  | j d  | j d  | j d  | r | j d | j  n@ |  j | d d d	 |  | j d
  | j d  | j d  | j d  | j d  d  S(   NR  R  R^   sE   static int %s(PyObject *o, Py_ssize_t i, Py_ssize_t j, PyObject *v) {t   sq_ass_slices   if (v) {s   return %s(o, i, j, v);t   tp_as_sequences
   o, i, j, vs'   PyErr_Format(PyExc_NotImplementedError,sM     "2-element slice assignment not supported by %.200s", Py_TYPE(o)->tp_name);s
   return -1;R   s   else {s   return %s(o, i, j);sK     "2-element slice deletion not supported by %.200s", Py_TYPE(o)->tp_name);(   R  R  R  Rl   R  R!  RT  (   R:   R   R   R  RU  RV  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    sR    c         @  s   d     f d      d  }   d  } | j d  | j d  j d   | d  k	 rw | j d | j  n | j d  | d  k	 r | j d	  | j d
  | j d | j  | j d  n  | j d  | j d  d  S(   Nc         @  s]   | d  k r  j } n  | j j |   } | d  k rU | j d  k	 rU   |  | j  S| Sd  S(   N(   R@   R  R   R  R  (   t   nR6   t   r(   t   lookup_here_or_baseR   (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR_    s    R  R  R^   s/   static PyObject *%s(PyObject *o, PyObject *n) {t   tp_getattros   PyObject *v = %s(o, n);s,   PyObject *v = PyObject_GenericGetAttr(o, n);s9   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {s   PyErr_Clear();s   v = %s(o, n);R   s	   return v;(   R@   Rl   R  R!  (   R:   R   R   t   getattr_entryt   getattribute_entry(    (   R_  R   s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    s6    

c         C@  s  | j  j } | j d  } | j d  } | j d  | j d | j d   | j d  | r{ | j d | j  n& |  j | d  d d |  | j d	  | j d
  | j d  | r | j d | j  n& |  j | d  d d |  | j d  | j d
  | j d
  d  S(   NR  R  R^   s6   static int %s(PyObject *o, PyObject *n, PyObject *v) {t   tp_setattros   if (v) {s   return %s(o, n, v);s   o, n, vs(   return PyObject_GenericSetAttr(o, n, v);R   s   else {s   return %s(o, n);s(   return PyObject_GenericSetAttr(o, n, 0);(   R  R  R  Rl   R  R!  RT  R@   (   R:   R   R   R  RU  RV  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    sB    c         C@  s   | j  d  } | j d  | j d | j d   | j d  | j d  | j d  | j d | j  | j d	  | j d
  d  S(   NR  R^   s<   static PyObject *%s(PyObject *o, PyObject *i, PyObject *c) {t   tp_descr_gets   PyObject *r = 0;s   if (!i) i = Py_None;s   if (!c) c = Py_None;s   r = %s(o, i, c);s	   return r;R   (   R  Rl   R  R!  (   R:   R   R   t   user_get_entry(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR     s$    c         C@  s6  | j  j } | j d  } | j d  } | j d  | j d | j d   | j d  | r{ | j d | j  n3 |  j | d  d d |  | j d	  | j d
  | j d  | j d  | r | j d | j  n3 |  j | d  d d |  | j d  | j d
  | j d  | j d  d  S(   NR  R  R^   s6   static int %s(PyObject *o, PyObject *i, PyObject *v) {t   tp_descr_sets   if (v) {s   return %s(o, i, v);s   o, i, vs6   PyErr_SetString(PyExc_NotImplementedError, "__set__");s
   return -1;R   s   else {s   return %s(o, i);s9   PyErr_SetString(PyExc_NotImplementedError, "__delete__");(   R  R  R  Rl   R  R!  RT  R@   (   R:   R   R   R  t   user_set_entryt   user_del_entry(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  /  sJ    c         C@  sn   xg | j  D]\ } | j } | j d g  r> |  j | |  n  | j d d g  r
 |  j | |  q
 q
 Wd  S(   NR  R  t   __del__(   t   property_entriesR   R  t   generate_property_get_functiont   generate_property_set_function(   R:   t   cclass_scopeR   R=   t   property_scope(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  [  s    	c         C@  s|   | j  } | j j t j | j  | _ | j d  } | j d  | j d | j  | j d | j	  | j d  d  S(   NR  R^   s9   static PyObject *%s(PyObject *o, CYTHON_UNUSED void *x) {s   return %s(o);R   (
   R   t   parent_scopeR   R   t   prop_get_prefixR   t   getter_cnameR  Rl   R!  (   R:   t   property_entryR   Rn  t	   get_entry(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRk  c  s    		c         C@  s  | j  } | j j t j | j  | _ | j d  } | j d  } | j d  | j d | j  | j d  | r | j d | j	  n | j d  | j d  | j d	  | j d
  | r | j d | j	  n | j d  | j d  | j d	  | j d	  d  S(   NR  Ri  R^   s@   static int %s(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {s   if (v) {s   return %s(o, v);s6   PyErr_SetString(PyExc_NotImplementedError, "__set__");s
   return -1;R   s   else {s   return %s(o);s6   PyErr_SetString(PyExc_NotImplementedError, "__del__");(
   R   Ro  R   R   t   prop_set_prefixR   t   setter_cnameR  Rl   R!  (   R:   Rr  R   Rn  RU  RV  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRl  r  sF    		c   
      C@  s  | j  } | j } x! t j D] } | j | |  q W| j d  | j d k r[ d } n d } | j | | j  | j d  | j d |  j | j	 f  | j
 r | j } n d | j } | j d |  | j d	  x! t j D] }	 |	 j | |  q W| j d
  d  S(   NR^   RX   s   DL_EXPORT(PyTypeObject) %s = {s   static PyTypeObject %s = {s   PyVarObject_HEAD_INIT(0, 0)s   "%s.%s", /*tp_name*/s	   struct %ss   sizeof(%s), /*tp_basicsize*/s   0, /*tp_itemsize*/s   };(   R6   R   R   t   substructurest   generate_substructureRl   RY   R   R5   t
   class_nameR  R*  t
   slot_tablet   generate(
   R:   t   modnameR=   R   R6   R   t   suiteR  t	   objstructRX  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    s2    				c         C@  s   | j  r | j r d  S| j d  | j d | j  x- | j D]" } | j sB | j | d  qB qB W| j d  | j d  d  S(   NR^   s   static PyMethodDef %s[] = {R  s   {0, 0, 0, 0}s   };(   t   is_c_class_scopet   pyfunc_entriesRl   t   method_table_cnamet   fused_cfunctiont   put_pymethoddef(   R:   R    R   R=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR     s    	c         C@  s   | j  d  } | j d  } | j } | j d  | j d |  |  j | |  | j d |  | j d |  | j d  | j d |  | j d	 |  | j d  d  S(
   Nt   __dict__getterR  R^   s9   static PyObject *%s(PyObject *o, CYTHON_UNUSED void *x) {s   if (unlikely(!p->%s)){s   p->%s = PyDict_New();R   s   Py_XINCREF(p->%s);s   return p->%s;(   R  R  R   Rl   R	  (   R:   R   R   t	   func_namet	   dict_attrt	   dict_name(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    s    	c         C@  s   | j  r | j d  | j d | j  x | j  D]t } | j } | rp | j ra | j   } n  | j   } n d } | j d | j | j p d | j	 p d | f  q4 W| j d  | j d  n  d  S(   NR^   s"   static struct PyGetSetDef %s[] = {R  s&   {(char *)"%s", %s, %s, (char *)%s, 0},s   {0, 0, 0, 0, 0}s   };(
   Rj  Rl   t   getset_table_cnameRA   t
   is_unicodet   as_utf8_stringt   as_c_string_literalR   Rq  Ru  (   R:   R    R   R=   RA   t   doc_code(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    s,    			c         C@  s^   xW t  | j j    D]@ \ } } | j r | j r | j j sV | j j |  qV q q Wd  S(   N(   R  R[   R  t
   is_cglobalR+  R6   t   is_pyobjectRn  (   R:   R    R   R=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyRH     s    "c         C@  s  | j  t j d d   | j   | j   | j d t j  | j d  x@ t | j j	    D]) \ } } | j
 rd | j d |  qd qd W| j d  | j d  | j d  | j d	  | j d
  | j d  | j d  | j d  | j d  | j d  | j   } | j d  d } xt | j j	    D]\ } } | j rH| j rH| d 7} | d d k r| j d  | j d  | j d  n  | j d |  | j j ri| j j s| j j r| j d | j j d  | j | j  f  n  | j d  | j | j | j d t | j d | j t j | j t d  f  np | j j |  r| j | j j d | j | j |   n3 | j d | | j f  | j | j | j   | j d  qHqHW| j d  | j d t j  | j d  | j d  | j | j  r]| j  | j  | j! |  j"  n  | | _ | j d   | j d!  | j d  | j d"  | j t j d# d$  j#  | j$   d  S(%   Nt   CStringEqualss   StringTools.cs;   static int %s(PyObject *o, PyObject* py_name, char *name) {s,   static const char* internal_type_names[] = {s   "%s",R  s   };s-   const char** type_name = internal_type_names;s   while (*type_name) {s$   if (__Pyx_StrEq(name, *type_name)) {sB   PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name);s	   goto bad;R   s   type_name++;s   if (0);i    i   id   s   #ifdef _MSC_VERs)   if (0);  /* Workaround for MSVC C1061. */s   #endifs#   else if (__Pyx_StrEq(name, "%s")) {s   if (!(%s)) %s;R  s   Py_INCREF(o);R  s   %s = %s;sG   PyErr_Format(PyExc_TypeError, "Cannot convert Python object %s to %s");s   else {s3   if (PyObject_SetAttr(%s, py_name, o) < 0) goto bad;s	   return 0;s   bad:s
   return -1;R^   t
   ImportStars   ImportExport.c(%   R   R   R  Rl   t   enter_cfunc_scopeR   t   import_star_setR  R[   R  t   is_typet   new_error_labelR  R+  R6   R  R-  R?  t   type_test_codet
   error_gotoRD   t
   put_decrefR   R   R   t   typecastR   Rn  t   from_py_call_codeRq  t
   label_usedt   error_labelt	   put_labelt   put_add_tracebackR5   t   implt   exit_cfunc_scope(   R:   R    R   R   R=   t   old_error_labelt
   msvc_count(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR     sx    

"	"
		 		c         C@  s  | j  |  j  | j d  d | j } d | j } | j d  | j d |  | j |  | j d  | j d |  | j |  | j d  | j d  | j   } | j j d	 } | j j d
 } | s | r | j j t j	 d d   n  | j
   | s| r+| j   | j   n  | j d  | j d  | j d  | j d  | j d  | j d  | j d  | j d  | j d  | j |  | j t j d d   | j |  j d  | j d t j | j t j |  j  f  | j d t j | j t j |  j  f  | j d t j | j t j |  j  f  xC dL D]; }	 | j d  |	  | j |  j d! |	  | j d  qdW| j d"  | j |  | j d#  | j d$  | j d%  | j d&  | j d  | j d  | j d'  |  j | |  | j d(  | j |  j d)  | j d*  | j |  j d+  | j d  | j j t d,  d- t }
 | j d. t j |  j j d/ d0  f  | j |  j d1 | j |
 j f  | j d  |  j  | |  t! j" r(| j d2  | j |  j d3  n  | j d4  | j |  j d5  | j d6  |  j# | |  | j d7  |  j$ | |  | j d8  |  j% | |  | j d9  |  j& | |  | j d:  x! | D] } |  j' | | |  qW| j d;  x! | D] } |  j( | | |  qW| j d<  x. | D]& } |  j) |  |  j* | | |  q2W| j d=  | j+ d   | j d>  | j |  j d?  | j d  | s| r| j- | |  j d@ | j. j/ t | j. _0 n  |  j1 j2 |  | s| r#t3 | j. _0 | j4 dA d@ | j. j/ n  | j   | j dB  |  j5 | |  | j   t! j6 r| j j t j	 dC d   | j dD | j7 |  j   n  | j8 | j9  | j: | j;  x- | j. j<   D] \ } } | j= | |  qW| j dE | j  | j dE | j>  | j? dF | j@  | j j tA jB  | j d  | jC | j tD dG t3 | j dH  | j dI | j@  | j d  | j: | j9  | jE   | j d  | j dJ  | j d  | j dK | j  | j d  | j d  | jF | j.  | jG   d  S(M   NR^   s   PyMODINIT_FUNC init%s(void)s   PyMODINIT_FUNC PyInit_%s(void)s   #if PY_MAJOR_VERSION < 3s   %s; /*proto*/s   #elses   #endifRE  t   profilet	   linetracet   Profiles	   Profile.cs   #if CYTHON_REFNANNYs5   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");s   if (!__Pyx_RefNanny) {s     PyErr_Clear();sF     __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");s     if (!__Pyx_RefNanny)s:         Py_FatalError("failed to import 'refnanny' module");R   t   CheckBinaryVersions   ModuleSetupCode.cs   __Pyx_check_binary_version()s   %s = PyTuple_New(0); %ss)   %s = PyBytes_FromStringAndSize("", 0); %ss+   %s = PyUnicode_FromStringAndSize("", 0); %st
   CyFunctiont   FusedFunctiont	   Coroutinet	   Generatort   StopAsyncIterations   #ifdef __Pyx_%s_USEDs   __pyx_%s_init()s)   /*--- Library function declarations ---*/s'   /*--- Threads initialization code ---*/sA   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADSs=   #ifdef WITH_THREAD /* Python build with threading support? */s   PyEval_InitThreads();s    /*--- Module creation code ---*/s4   /*--- Initialize various global constants etc. ---*/s   __Pyx_InitGlobals()sp   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)s*   __Pyx_init_sys_getdefaultencoding_params()t   __main__t
   identifiers   if (%s%s) {R   R   s*   PyObject_SetAttrString(%s, "__name__", %s)s   /*--- Builtin init code ---*/s   __Pyx_InitCachedBuiltins()s   /*--- Constants init code ---*/s   __Pyx_InitCachedConstants()s   /*--- Global init code ---*/s    /*--- Variable export code ---*/s    /*--- Function export code ---*/s   /*--- Type init code ---*/s   /*--- Type import code ---*/s    /*--- Variable import code ---*/s    /*--- Function import code ---*/s   /*--- Execution code ---*/sB   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)s   __Pyx_patch_abc()t   nogilt   Py_Nones   /*--- Wrapped vars code ---*/t   RegisterModuleCleanups    if (__Pyx_RegisterCleanup()) %s;s	   if (%s) {s   init %sR  s   } else if (!PyErr_Occurred()) {s.   PyErr_SetString(PyExc_ImportError, "init %s");s   return;s
   return %s;(   R  s   FusedFunctions	   Coroutines	   Generators   StopAsyncIteration(H   R  R   Rl   R7   t   insertion_pointR   R   R   R   R  t   put_declare_refcount_contextt   put_trace_declarationst   put_trace_frame_initt   put_setup_refcount_contextt   loadt   put_error_if_negRD   R   Rt  t   error_goto_if_nullRu  Rv  t&   generate_library_function_declarationst   generate_module_creation_codet   get_py_string_constR	   R8   R   R5   R   Rq  R   t   generate_module_import_setupR   t   cache_builtinst   generate_global_init_codet   generate_c_variable_export_codet   generate_c_function_export_codet   generate_type_init_codet$   generate_type_import_code_for_modulet*   generate_c_variable_import_code_for_moduleR  t*   generate_c_function_import_code_for_moduleR   R@   t   put_trace_callt	   funcstatet	   gil_ownedt	   can_traceR$   t   generate_execution_codeR   t   put_trace_returnt   generate_wrapped_entries_codet   generate_cleanup_codeR  t   put_gotot   return_labelR  R  t   all_managed_tempst   put_xdecrefRr  R  R   R   t   traceback_utility_codeR"  R   t   put_finish_refcount_contextt   put_temp_declarationsR  (   R:   t   imported_modulesR    R   t   header2t   header3t   tempdecl_codeR  R  t   ext_typet   _ModuleNode__main__nameRV   R   R6   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR   9  s   

	#	#	#	)	 

		 
c   	      C@  s  | j  d } | d k r, |  j d j } n  | r@| j d | j | j j t t |    j	 | j
 |  j  f  | j r| j j t t  } | j d | | j j t t t j j |     j	 | j | |  j  f  | j |  | j d | j | | j
 |  j  f  | j | t  | j j |  qn | j r|  j j d d  \ } } d | k rd	 | j d d  d f } n d
 } | j j t j d d   | j | j d | | j j t | j   j	 f |  j   n  |  j } | j d  r| t d   } n  | j d  | j d  | j d | j d |  j   | j d |  | j | j d | | j f |  j   | j d  | j d  | j d  d  S(   Nt   set_initial_patht
   SOURCEFILEi    s7   if (PyObject_SetAttrString(%s, "__file__", %s) < 0) %s;s!   %s = Py_BuildValue("[O]", %s); %ss7   if (PyObject_SetAttrString(%s, "__path__", %s) < 0) %s;R   i   s   "%s"t   NULLt   SetPackagePathFromImportLibs   ImportExport.cs)   __Pyx_SetPackagePathFromImportLib(%s, %s)s	   .__init__s   #if PY_MAJOR_VERSION >= 3RE  s0   PyObject *modules = PyImport_GetModuleDict(); %sR   s+   if (!PyDict_GetItemString(modules, "%s")) {s'   PyDict_SetItemString(modules, "%s", %s)R   s   #endif(    R   RD   R|  Rl   Rq  R   R  R	   R   R   R  t
   is_packageR  t   allocate_tempR   R8   R   R   R   R  t
   put_gotrefR"  t   release_tempR5   t   rsplitR   R   R  t   error_goto_if_negR7   t   endswithR  (	   R:   R    R   t   module_patht   tempt   package_nameRQ  t   parent_namet   fq_module_name(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    sb    					 	 			c   
      C@  s  t  j s d  S| j d t j  t  j d k r | j d  t | j  } | j   x] | D]R } | j d k r] | j	 j
 r | j r | j | j | j	 d t d t q q] q] Wn  | j d  t  j d k r*| j d	  xH t | j d
 t j d  D]% } | j | j | d t d t q Wn  t  j ry| j d  x6 | j D]( } | j | j t j d t d t qJWn  | j d  | j t j t j d t d t x | j D] } | j	 } | j s| j rqn  | j j j  d d  r| j } | j! t j"  } | j! t j#  }	 | j d |	  | j d | |	 f  | j d  | j d  qqW| j d  | j d t j$  | j d  | j | j% t d t d t d  S(   Ns.   static void %s(CYTHON_UNUSED PyObject *self) {i   s   /*--- Global cleanup code ---*/R  R8  R  s   __Pyx_CleanupGlobals();i   s$   /*--- Type import cleanup code ---*/R   R   s    /*--- Builtin cleanup code ---*/s   /*--- Intern cleanup code ---*/R  i    s   while (%s > 0) {s"   PyObject* o = (PyObject*)%s[--%s];s   (*Py_TYPE(o)->tp_free)(o);R   s   #if CYTHON_COMPILING_IN_PYPYs   Py_CLEAR(%s);s   #endif(&   R   R  Rl   R   t   cleanup_cnamet   listR`   t   reverseRY   R6   R  R+  R=  R   R8   R   R  t   types_importedR6  R7  R   R  t   cached_builtinsR   R   R"  Rt  R4   t   is_externalR  R   R   R  R  R  R  Rs  Rr  (
   R:   R    R   t   rev_entriesR=   R  t   cclass_typeR   R  R  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR   $	  sj    		
%					c      
   C@  s   d t  j |  j j d d  f } t j d k r: d } n	 t j } t j d d  } | j j	 | j
 d | j d	 | d
 t j d |   d  S(   Ns   %s%sR   R   t   maint   wmaint   MainFunctions   Embed.cR7   R   R   t   wmain_method(   R   R   R5   R   R   R   R   R  R   R   t
   specializeR7   (   R:   R    R   R   R  R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR   i	  s    "						c         C@  sR  | j  r" d | j | j   } n d } t j rA d t j } n d } | j d  | j d  | j d t j  | j d  | j d	  | j d
  | j d  | j d  | j d | j  | j d |  | j d  | j d | j	  | j d  | j d  | j d  | j d |  | j d  | j d  d  S(   Ns   %sR  s   (freefunc)%sR  R^   s   #if PY_MAJOR_VERSION >= 3s    static struct PyModuleDef %s = {s   #if PY_VERSION_HEX < 0x03020000s-     { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },s   #elses     PyModuleDef_HEAD_INIT,s   #endifs     "%s",s     %s, /* m_doc */s     -1, /* m_size */s     %s /* m_methods */,s     NULL, /* m_reload */s     NULL, /* m_traverse */s     NULL, /* m_clear */s     %s /* m_free */s   };(
   RA   t   get_string_constR   R  R   R  Rl   t   pymoduledef_cnameR7   R  (   R:   R    R   RA   t   cleanup_func(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR   w	  s0    		c         C@  s  | j  r" d | j | j   } n d } | j d  | j d | j | j | j | | j f  | j d  | j d | j t j f  | j d  | j | j | j |  j	   | j d | j
 | j | j | j
 |  j	  f  | j | j
 t d	 t | j d
 t j | j t j |  j	  f  | j d  | j d t j  | j d  | j d | j t j | j |  j	  f  t j d  k	 r| j d t j t j | j t j |  j	  f  n  d  S(   Ns   %sR  s   #if PY_MAJOR_VERSION < 3sI   %s = Py_InitModule4("%s", %s, %s, 0, PYTHON_API_VERSION); Py_XINCREF(%s);s   #elses   %s = PyModule_Create(&%s);s   #endifs   %s = PyModule_GetDict(%s); %sR  s6   %s = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); %ss   #if CYTHON_COMPILING_IN_PYPYs   Py_INCREF(%s);s;   if (PyObject_SetAttrString(%s, "__builtins__", %s) < 0) %s;s!   %s = PyImport_AddModule("%s"); %s(   RA   R  Rl   Rq  R7   R  R   R  R  RD   Rr  t
   put_increfR   R   Rs  R  R   Rw  R@   Rx  (   R:   R    R   RA   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  	  sR    	c         C@  sI   xB | j  D]7 } | j d k r
 | j rA | j j | |  qA q
 q
 Wd  S(   NR  (   R`   RY   R+  R6   t   global_init_code(   R:   R    R   R=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  	  s    	c         C@  s   x t  | j j    D] \ } } | j r | j r | j | k r | j j |  sp t | j	 d | j  n  | j
 d  | j
 d | j j | j f  | j
 | j d | j	   | j
 d | j | | j | j	  f  | j
 d  q q Wd  S(   Ns$   Cannot convert '%s' to Python objectRE  s   PyObject* wrapped = %s(%s);t   wrappeds6   if (PyObject_SetAttrString(%s, "%s", wrapped) < 0) %s;R   (   R  R[   R  t   create_wrapperR  R   R6   Rm  R   RD   Rl   t   to_py_functionR   R  Rq  R  (   R:   R    R   R   R=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  	  s"    "	
		c         C@  s   g  } xL | j  D]A } | j sA | j sA t j r | j d k r | j |  q q W| r | j t j	 d d   x^ | D]S } | j
 j   } | j | j  } | j d | | j | | j |  j  f  q{ Wn  d  S(   NR  t   VoidPtrExports   ImportExport.cs6   if (__Pyx_ExportVoidPtr(%s, (void *)&%s, "%s") < 0) %s(   R`   RZ   RU   R   t   cimport_from_pyxRY   R%   R   R   R  R6   R   t   intern_identifierR   Rl   R   R  RD   (   R:   R    R   R[   R=   t	   signatureR   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  	  s    			c         C@  s   g  } xL | j  D]A } | j sA | j sA t j r | j d k r | j |  q q W| r | j t j	 d d   xO | D]D } | j
 j   } | j d | j | j | | j |  j  f  q{ Wn  d  S(   NR  t   FunctionExports   ImportExport.cs@   if (__Pyx_ExportFunction("%s", (void (*)(void))%s, "%s") < 0) %s(   RT   RZ   RU   R   R  RY   R%   R   R   R  R6   R   Rl   R   R   R  RD   (   R:   R    R   R[   R=   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  	  s     			c         C@  s@   x9 | j  D]. } | j r
 |  j | | j | j |  q
 q
 Wd  S(   N(   R4   RU   t   generate_type_import_codeR6   RD   (   R:   RV   R    R   R=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  
  s    	c         C@  s5   x. | j  D]" } | j j r | j j   q q Wd S(   s  
        If fused c(p)def functions are defined in an imported pxd, but not
        used in this implementation file, we still have fused entries and
        not specialized ones. This method replaces any fused entries with their
        specialized ones.
        N(   RT   R6   t   is_fusedt"   get_all_specialized_function_types(   R:   t   pxd_envR=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  
  s    c   	   	   C@  sL  g  } x* | j  D] } | j r | j |  q q W| rH| j t j d d   | j t j d d   | j j t d t	 } | j
 d | | j | | j |  j  f  x| | D]t } | | k r | j } n | j t j | j  } | j j   } | j
 d | | j | | | j |  j  f  q W| j
 d | | f  n  d  S(   NR   s   ImportExport.cR   t
   manage_refs*   %s = __Pyx_ImportModule("%s"); if (!%s) %ss=   if (__Pyx_ImportVoidPtr(%s, "%s", (void **)&%s, "%s") < 0) %ss   Py_DECREF(%s); %s = 0;(   R`   RU   R%   R   R   R  R  R  R   R8   Rl   R   R  RD   R   R   R   R  R   R6   R   (	   R:   RV   R    R   R[   R=   R  R   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  
  s4    	c      	   C@  s"  g  } x3 | j  D]( } | j r | j r | j |  q q W| r| j t j d d   | j t j d d   | j j t	 d t
 } | j d | | j | | j |  j  f  xI | D]A } | j d | | j | j | j j   | j |  j  f  q W| j d | | f  n  d  S(   NR   s   ImportExport.cR   R  s*   %s = __Pyx_ImportModule("%s"); if (!%s) %ssF   if (__Pyx_ImportFunction(%s, "%s", (void (**)(void))&%s, "%s") < 0) %ss   Py_DECREF(%s); %s = 0;(   RT   RU   R+  R%   R   R   R  R  R  R   R8   Rl   R   R  RD   R   R   R6   R   (   R:   RV   R    R   R[   R=   R  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  5
  s2    c         C@  s   x | j  D] } | j d k rH | j rH |  j | | j | j |  q
 |  j | | |  |  j | |  |  j | | |  |  j	 | |  q
 Wd  S(   NR  (
   R4   RY   t   utility_code_definitionR  R6   RD   t   generate_base_type_import_codet!   generate_exttype_vtable_init_codet   generate_type_ready_codet    generate_typeptr_assignment_code(   R:   R    R   R=   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  Q
  s    c         C@  sX   | j  j } | rT | j | j k rT | j rT | j rT |  j | | |  j |  n  d  S(   N(   R6   R  R7   R   R?  R  R  RD   (   R:   R    R=   R   R  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  ]
  s    c         C@  s   | | j  k r d  S| j t j d d   |  j | | | j | j |   | j r | j j t j d d   | j	 d | j | j
 | j | j | j |  f  n  | j  j |  d  S(   NR   s   ImportExport.ct	   GetVTables1   %s = (struct %s*)__Pyx_GetVtable(%s->tp_dict); %s(   R  R   R   R  R   R  R   R  R   Rl   R(  R  (   R:   R    R6   RD   R   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  c
  s    			RZ  R  t   unicodec   	      C@  s  | j  r | j } n d | j } | } | j } d  } } | d k rT d | } nP d } | j t j k r t j | j \ } } n  | t j k r t j | } n  | j d | j	 | f  | r*| r*| j
 d  | j
 d |  | j
 d	 |  | j
 d
  | j
 d	 | j  | j
 d  n | j d | j  | | k r| s`| j
 d  n  | j
 d  | j
 d |  | j
 d
  | j
 d |  | j
 d  n | j d |  | j
 d | j p| j | f  d  S(   Ns	   struct %st   __builtin__t   builtinss   "%s"t   __Pyx_BUILTIN_MODULE_NAMEs   %s = __Pyx_ImportType(%s,R^   s   #if %ss   "%s",s   #elses   #endifs    "%s", s   #if CYTHON_COMPILING_IN_PYPYs   sizeof(%s),s   sizeof(%s), s   %i); %s(   s   __builtin__s   builtins(   R  R*  R7   R@   R   R   t   non_portable_builtins_mapt   basicsize_builtins_mapR   R   Rl   R  t   is_subclassed(	   R:   R6   R   t
   error_codeR}  t   sizeof_objstructR7   t	   conditiont   replacement(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR   x
  sH    		
		c         C@  s  | j  } | j } | j } | r
| j d k r
x! t j D] } | j | |  q: W| j d | | j | j	  f  | j d |  xR| j  j j
 D]A} | j d k }	 | j r t j r | j r |	 r t j | j } | j   }
 |
 r| j |
  n  | j d  | j d  | j d | | j | j d	 | j	  f  | j d
  | j d | j  | j d | j | j f  | j d | j  | j d  | j d  | j d  |
 r| j d  qq q W| j r.| j d | | j | j | j	  f  | j j t j d d   n  | j j r~| j j d r~| j d t j | j | | j | j	  f  n  | j d  } | r| j  t  k rd | } | j! r| j" } n d | j" } | j d | | | | j# f  qt$ | j	 d  qq
n  d  S(   NR  s   if (PyType_Ready(&%s) < 0) %ss   %s.tp_print = 0;t   __getbuffer__t   __releasebuffer__s   #if CYTHON_COMPILING_IN_CPYTHONRE  sE   PyObject *wrapper = PyObject_GetAttrString((PyObject *)&%s, "%s"); %st   wrappers/   if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {s0   %s = *((PyWrapperDescrObject *)wrapper)->d_base;s   %s.doc = %s;s0   ((PyWrapperDescrObject *)wrapper)->d_base = &%s;R   s   #endifs+   if (__Pyx_SetVtable(%s.tp_dict, %s) < 0) %st	   SetVTables   ImportExport.cR*   s=   if (PyObject_SetAttrString(%s, "%s", (PyObject *)&%s) < 0) %sR7  s   %s.tp_weaklistoffsets	   struct %ss#   if (%s == 0) %s = offsetof(%s, %s);s)   __weakref__ slot must be of type 'object'(   s   __getbuffer__s   __releasebuffer__(%   R6   R   R   RY   R   Ry  t   generate_dynamic_init_codeRl   R  RD   R  R   R  R   R?   t   wrapperbase_cnamet   method_name_to_slott   preprocessor_guard_codeR  t	   doc_cnameR  R  R   R   R   R  R  R   R   Rq  Rx  R  R   R  R*  R   R   (   R:   R    R=   R   R6   R   R   RX  t   funct	   is_buffert   preprocessor_guardt   weakref_entryt   tp_weaklistoffsetR}  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR
  
  s    					
		c         C@  s   | j  } | j r | j d | j | j f  | j rm | j j rm | j d | j t j | j j f  n  g  | j j D] } | j	 rz | ^ qz } | r xF | D]; } | j  j
   } | j d | j | j | | j	 f  q Wq n  d  S(   Ns	   %s = &%s;s   %s.%s = *%s;s   %s.%s = %s%s;(   R6   R  Rl   R  R  R   R  R   RT   R!  t   signature_cast_stringR   (   R:   R=   R   R6   t   c_method_entriest
   meth_entryt   cast(    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR	  
  s.    		c         C@  s6   | j  } | j r2 | j d | j | j f  n  d  S(   Ns	   %s = &%s;(   R6   R   Rl   R   (   R:   R=   R   R6   (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR    s
    		N(c   t   __name__t
   __module__t   child_attrsR@   R   R   R9   RF   RI   RS   RW   RP   Ru   Rj   RQ   Rs   Rt   RO   R   R   RM   R&  R5  RN   RD  R   RN  R   Rq   Rr   Ro   R   R  Rm   R  R  R  R  R  R  R  R  R=  R>  R?  R@  R;  R<  RG  RH  RI  R   R   R  R	  R  R  R<  R  R  R  R  RT  R  R  R  R   R  R  Rk  Rl  R  R   R  R  RH   R   R   R  R   R   R   R  R  R  R  R  R  R  R  R  R  R  R  t   py3_type_name_mapR   R
  R	  R  (    (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR#   8   s   	#			
		B				S			F	)				,					r	
					"						!								(		.				,						>	D		.		0	-	(		,			'						D		<	E			/												/	T	c   
      C@  s=  |  j  o |  j } |  j  r$ |  j sR |  j r9| sR |  j sR |  j d k sR | r9|  j d k rs t j } d } nK |  j d k r t j } d } n* |  j d k r d } d  } n d } d  } |  j	 } |  j r | r d } d  } t
 |  } n  | j |  j d | } | j |  j  }	 | j d | |	 | f  n  d  S(	   NR  R   RX   R  R  R  R   s   %s %s%s; /*proto*/(   R+  R  t   inline_func_in_pxdR,  RU   RY   R   R   R@   R6   R
   R   R   R  R  Rl   (
   R=   R    R   RB  t   from_cy_utilityR  R   R6   R  R  (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyR  !  s4    $							t   Refnannys   ModuleSetupCode.ct   protosj   
#if defined(__GNUC__)
#define __Pyx_PACKED __attribute__((__packed__))
#else
#define __Pyx_PACKED
#endif
R  R^   t   proto_blockt   utility_code_proto_before_typest   Capsule((   t
   __future__R    t   cythont   declaret   objectR`  R   R6  R   R
   R^   R   R   R   R   R   R   R   t   ErrorsR   R   R   t   UtilsR   R   R   R   t   StringEncodingR	   R   R   R"   t   Nodet	   BlockNodeR#   R  R  R   R  t   capsule_utility_code(    (    (    s=   /bar/jli/Chip-seq/script/cython/Cython/Compiler/ModuleNode.pyt   <module>   sP   !			          	%