`Kc@s8ddlZddlZddlZddlmZmZmZddlZddlZddlm Z m Z m Z m Z m Z ddlmZmZmZmZmZddlmZmZddlZddlmZdfdYZd fd YZd efd YZd efdYZdefdYZdefdYZdefdYZ defdYZ!defdYZ"defdYZ#defdYZ$defdYZ%de%fd YZ&d!e%fd"YZ'd#efd$YZ(d%efd&YZ)d'efd(YZ*d)efd*YZ+d+efd,YZ,d-eefd.YZ-d/e-fd0YZ.d1efd2YZ/d3e-fd4YZ0d5eefd6YZ1d7efd8YZ2d9efd:YZ3d;efd<YZ4d=efd>YZ5d?efd@YZ6dAe6fdBYZ7dCe7fdDYZ8dEe6fdFYZ9dGe6fdHYZ:dIefdJYZ;dKefdLYZ<dMefdNYZ=dOefdPYZ>dQefdRYZ?dSefdTYZ@dUefdVYZAdWefdXYZBdYefdZYZCd[efd\YZDd]efd^YZEd_efd`YZFdaefdbYZGdcefddYZHdeefdfYZIdgefdhYZJdiefdjYZKdkeKfdlYZLdmefdnYZMdoefdpYZNdqefdrYZOdsefdtYZPduZQdvdwgZRdxdygZSdzd{gZTd|d}gZUd~dgZVddiejWd6ejXd6ejYd6gZZddgZ[ddgZ\ddgZ]ddgZ^dS(iN(terrortone_time_warningt InternalError(tpy_object_typet c_int_typet error_typet CTypedefTypet CFuncType(t ModuleScopet LocalScopetStructOrUnionScopet PyClassScopet CClassScope(t open_new_filetreplace_suffix(tdebug_disposal_codetNodecBsSeZdZdZdZdZdZddZdZ dZ dZ RS( icKs||_|jj|dS(N(tpost__dict__tupdate(tselfRtkw((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyt__init__s t OperationcCs|jr|jndS(N(tnogilt gil_error(Rtenv((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyt gil_check"s cCs!t|jd|p|jdS(Ns%s not allowed without gil(RRt gil_message(Rtmessage((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR&scCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pytanalyse_declarations>scCstd|jjdS(Ns*analyse_expressions not implemented for %s(Rt __class__t__name__(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pytanalyse_expressionsAscCstd|jjdS(Ns$generate_code not implemented for %s(RRR (Rtcode((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyt generate_codeEsN( R t __module__tis_namet is_literalRRRtNoneRRR!R#(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs     t BlockNodecBseZRS((R R$(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR(Jst StatListNodecBs,eZdZdZdZdZRS(cCs%x|jD]}|j|q WdS(N(tstatsR(RRtstat((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRnscCs%x|jD]}|j|q WdS(N(R*R!(RRR+((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!sscCs(x!|jD]}|j||q WdS(N(R*tgenerate_function_definitions(RRR"R+((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR,xscCs5x.|jD]#}|j|j|j|q WdS(N(R*tmark_posRtgenerate_execution_code(RR"R+((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.}s(R R$RR!R,R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR)ks   tStatNodecBseZdZdZRS(cCsdS(N((RRR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR,scCstd|jjdS(Ns.generate_execution_code not implemented for %s(RRR (RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s(R R$R,R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR/s tCDefExternNodecBs#eZdZdZdZRS(cCsK|jr|j|jn|j}d|_|jj|||_dS(Ni(t include_filetadd_include_filet in_cincludetbodyR(RRtold_cinclude_flag((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs    cCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!scCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s(R R$RR!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR0s  tCDeclaratorNodecBseZdZRS(t(R R$tcalling_convention(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR6s tCNameDeclaratorNodecBseZdZRS(cCs ||fS(N((Rt base_typeR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pytanalyses(R R$R;(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR9stCPtrDeclaratorNodecBseZdZRS(cCs>|jrt|jdntj|}|jj||S(Ns+Pointer base type cannot be a Python object(t is_pyobjectRRt PyrexTypest c_ptr_typetbaseR;(RR:Rtptr_type((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR;s    (R R$R;(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR<stCArrayDeclaratorNodecBseZdZRS(cCs|jrP|jj||jjjs>t|jjdn|jj}nd}|jsyt|jd|n|j rt|jdn|j rt|jdnt j ||}|j j||S(NsArray dimension not integers%Array element type '%s' is incompletes'Array element cannot be a Python objects"Array element cannot be a function(t dimensiontanalyse_const_expressionttypetis_intRRtresultR't is_completeR=t is_cfunctionR>t c_array_typeR@R;(RR:Rtsizet array_type((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR;s"         (R R$R;(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRBstCFuncDeclaratorNodecBseZdZRS(c Csg}x|jD]}|j|\}}|j}|jrPt|jdn|jrntj|j }n|j rt|jdn|j tj |||j|j rt|jdqqWd}d} |jr|js|jrt|jdn_|jrY|jj||jj}|j|jjsYt|jjdqYn|j} |jr~t|jdn|jrt|jdntj|||jd |d | d |jjd |jd |j} |jj| |S(Ns2Function argument cannot have C name specifications Function argument cannot be voids-C function argument cannot have default valueisAException clause not allowed for function returning Python objects6Exception value incompatible with function return typesFunction cannot return an arrays!Function cannot return a functiontexception_valuetexception_checkR8Rtwith_gil(targsR;tnametcnameRRtis_arrayR>R?R:tis_voidtappendt CFuncTypeArgtdefaultR'R=RNRORDRGtassignable_fromRERIRt has_varargsR@R8RRP( Rt return_typeRtfunc_type_argstarg_nodetname_declaratorRERRtexc_valt exc_checkt func_type((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR;sP                      (R R$R;(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRMs t CArgDeclNodecBseZdZdZRS(icCs%|jj|}|jj||S(N(R:R;t declarator(RRR:((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR;-s(R R$t is_self_argR;(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRbs t CBaseTypeNodecBseZRS((R R$(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRe3stCSimpleBaseTypeNodecBseZdZRS(cCs!d}|jrItj|j|j|j}|s t|jdq n|jdkrk|j rkt }n|jdkr|j r|j r|j }q t }nk|j|j |j}|r |j|j|j}|r|jr|j}q t|jd|jn|r|StjSdS(Ns&Unrecognised type modifier combinationtobjects'%s' is not a type identifier(R'tis_basic_c_typeR>t simple_c_typetsignedtlongnessRRRRt module_pathRRdtis_c_class_scopet parent_typetfind_imported_moduletfindtis_typeRER(RRREtscopetentry((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR;Fs(     (R R$R;(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRf>stCComplexBaseTypeNodecBseZdZRS(cCs1|jj|}|jj||\}}|S(N(R:R;Rc(RRR@t_RE((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR;hs(R R$R;(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRtdst CVarDefNodecBs&eZddZdZdZRS(c Csg|s|}n|jj|}x?|jD]4}|j||\}}|js|jdkoj|jst|jd|qn|jdkr|jrt|jdn|j }|j }|j r |j |||jd|d|jd|j d|j} q+|j r4|jdkr4t|jdn|j|||jd|d|jd d q+WdS( Ntexterns Variable type '%s' is incompletes'Python object cannot be declared externRSt visibilitytin_pxdtapis9Only 'extern' C variable declaration allowed in .pxd filetis_cdefi(R:R;t declaratorsRHRxRTRRR=RRRSRItdeclare_cfunctionRyRzt declare_var( RRt dest_scopeR:RcR^RERRRSRs((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRws.          cCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!scCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.sN(R R$R'RR!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRvns  tCStructOrUnionDefNodecBs#eZdZdZdZRS(cszdg}xjD]}j|j}|r|jrq|jjrq|jjjrq|j |jjqt jddj |d|dgqqWj dk rt d|djnjrjjjsdSnfd}js-|nj dk rcx$j D]}|jqFWnjrv|ndS(Ns"Base type '%s' is not a C++ structt.iit base_scopestis_cplusc sqjjjjjjdj_jdk rmj rmj rmdj_ qmndS(NRxi( tdeclare_struct_or_unionRRtkindt typedef_flagRRSRxRst attributesR'RyR3tdefined_in_pxd((Rt home_scopeRrR(s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pytdeclares (R'tbasestfind_qualified_nameRRqREtis_struct_or_unionRrRRVRtjoinRR t cplus_flagRlRoRR(RRRR@t base_entryRtattr((RRRrRs8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs2 '    cCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!scCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s(R R$RR!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs # t CEnumDefNodecBs#eZdZdZdZRS(c Cs|j|j|jd|jd|jd|j|_|jdk r|j rg|j rgd|j_ nx'|jD]}|j ||jqqWndS(NRSRRxi( t declare_enumRRRRSRRxRstitemsR'RyR3RR(RRtitem((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!scCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s(R R$RR!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs tCEnumDefItemNodecBseZdZRS(cCs|j}|rc|j||j}|js7|jrF|j}qlt|jd|d}n |j}|j |j|j||jd|j }|j j |dS(Ns#Type '%s' is not a valid enum valuesRS( tvalueRDRERFtis_enumRGRRRRt declare_constRSt enum_valuesRV(RRt enum_entryt value_nodeRERRs((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs       (R R$R(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRst CTypeDefNodecBs#eZdZdZdZRS(cCs|jj|}|jj||\}}|j}|j}|j|||jd|d|j}|jr|j rd|_ ndS(NRSRxi( R:R;RcRRRStdeclare_typedefRRxRyR3R(RRR@R^RERRRSRs((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs  cCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!scCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s(R R$RR!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs t FuncDefNodecBsSeZdZdZdZdZddZdZdZdZ RS( cCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!scCsdS(Ni((Rtlenv((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pytneed_gil_acquisition!scCs|j}td|jjd|}|j|_|jj}|jra|joX|j |_n|j |j ||j j ||j j ||jd|j|d|j|j|||j|jd}|jjs|jd|jjtj|fn|j|j|j||j||j|}|rtd|j_|jdn|j||j||x?|jD]4}|jjr|j r|j!r|j"|qqW|j#||j$||j j%||jd|jjr5tj} |j&| |jn/|jj'} | rd|jdtj| fn|j(|j)kri|j*|j+|j,|j(|j-|j|jj'} |j.} |j/} | s| r|jd |jj0| p| } | rf|jdtj| fqfqi|j1t2|jd |jj0| ri|jdtj| fqin|j,|j+|j3|jd d|j4|||j5||r|jd n|jjs|jd tjn|jddS(NRRt outer_scopeR7twith_pymethdefs%s%s;is-PyGILState_STATE _save = PyGILState_Ensure();s%s = %s;s__Pyx_AddTraceback("%s");s__Pyx_WriteUnraisable("%s");t used_onlysPyGILState_Release(_save);s return %s;t}(6t global_scopeR RsRRR[RERIRRPt init_labelstdeclare_argumentsR4RR!tputlntgenerate_function_headertis_py_class_scopetgenerate_argument_declarationstput_var_declarationst var_entriesRUtdeclaration_codetNamingt retval_cnamet temp_entriestgenerate_keyword_listt&generate_library_function_declarationsRtgil_usedtgenerate_argument_parsing_codetgenerate_argument_increfsR=t init_to_nonetusedtput_init_var_to_py_nonet!generate_argument_conversion_codetgenerate_argument_type_testsR.tput_init_to_py_nonet default_valuet error_labelt labels_usedtput_gotot return_labelt put_labeltput_var_xdecrefst error_valuetcaller_will_check_exceptionstqualified_nametuse_utility_codet!unraisable_exception_utility_codetput_var_decrefstgenerate_argument_decrefstput_stararg_decrefs(RRR"tgenvRREtinitt acquire_gilRstlhstvaltdefault_retvalterr_valR`((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR,$s                             cCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRsicCsx|jjrt|jdn7|jj rV|jj rVt|jd|jn|j|j|j|jd|S(NsInvalid use of 'void's Argument type '%s' is incompletetreadonly(RERURRRHRTt declare_argRR(RRtargR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pytdeclare_arguments  cCs1x*|jD]}|js |j|q q WdS(N(t arg_entriest is_readonlytput_var_incref(RRR"Rs((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs cCs1x*|jD]}|js |j|q q WdS(N(RRtput_var_decref(RRR"Rs((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs cCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s( R R$R!RR,RRRRR.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs   h   t CFuncDefNodecBsteZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z RS( cCs |jjS(N(RsRR(R((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pytunqualified_namesc Cs|jj|}|jj||\}}|jsIt|jdn||_|j}|j}|j |||jd|d|j d|j dk d|j |_|j|_dS(Ns*Suite attached to non-function declarationRSRxtdefiningRz(R:R;RcRIRRRERRRSR}RxR4R'RzRsR[(RRR:R^RERRRS((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs      cCsr|j}|jo|j }xO|jD]D}|jsHt|jdn|j||d|of|jjq&WdS(NsMissing argument nameR( RERRPRQRRRRRR=(RRREt without_gilR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs  cCs|j}|j}|jr| r|jjrAt|jdnxD|j|jD]/}|jjrR|j rRt|jdqRqRWn|S(Ns9Function with Python return type cannot be declared nogils8Function declared nogil has Python locals or temporaries( RERPRR[R=RRRRR(RRRERPRs((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs     c Csg}|j}|jj}x$|jD]}|j|jq%W|jr[|jdn|smdg}n|j|jjt j |d}|dkrd}nd}|j j|d|} |dkrdt j} nd } |jd | | fdS( Ns...tvoidt,tpublict DL_EXPORTt dll_linkagetprivates%s sstatic s%s%s {(RERsRxRQRVRRZtfunction_header_codet func_cnametstringRR'R[Rtextern_c_macroR( RR"Rt arg_declsRERxRtentityRtheadert storage_class((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs,         cCsdS(N((RRR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR scCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR scCs!|jjrdS|jjjSdS(Nt0(R[R=RsRERN(R((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs cCs |jjjS(N(RsRERO(R((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs(R R$RRRRRRRRRRRR(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs          t PyArgDeclNodecBseZRS((R R$(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRstDefNodecBseZdZdZdZdZdZdZdZ dZ dZ dZ dZ d Zd Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!RS(iRcKsztj|||d}x'|jD]}|jr#|d7}q#q#W||_|jsj|jsj|dkrvd|_ndS(Nii(RRRQtkw_onlytnum_kwonly_argststar_argt starstar_argthas_star_or_kwonly_args(RRtkwdstnR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR9s  cCsx|jD]}|jj|}|jj||\}}|j|_|jret|jdn|j|_ d|_ d|_ d|_ d|_|jdk r |j j r t|jdq q W|j||j||jjj|_dS(Ns9Python function argument cannot have C name specificationiis>Only extension type arguments can have 'or None' or 'not None'(RQR:R;RcRRRSRRtas_argument_typeRER'thdr_typetneeds_conversiontneeds_type_testt is_generict allow_nonetis_extension_typetdeclare_pyfunctiontanalyse_signatureRst signatureR[(RRRR:R^RE((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRCs$           cCsd}|jj}|j}xt|D]}|t|jkr%|j|}d|_|j|rd|_|j|_ |_ d|_ n]|j ||_ |j j |j s|j jr|j jrd|_d}qd|_ n|j rtj|j|_q3tj|j|_q+|jdSq+W|t|jkr|jsb|jnx;|jD]-}|jrl|j jrld|_d}qlqlWndS(Nii(RsRtnum_fixed_argstrangetlenRQRRdRnRRERtfixed_arg_typetsame_asR=RRt arg_prefixRRt hdr_cnamet var_prefixt bad_signaturethas_generic_argsR(RRtany_type_tests_neededtsigtnfixedtiR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRZs:              cCs|jj}d|j}|jr2|d}n|j}|jdrb|jdrbd}nd}t|jd||jt |j |fdS(Ns%ds or moret__sSpecial methodtMethods>%s %s has wrong number of arguments (%d declared, %s expected)( RsRRR RRt startswithtendswithRRRRQ(RR t expected_strRRtdesc((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR s      cCs|j}|j|j|j}||_|j}tj|||_tj|||_ |j s|j |_ tj |||_ ndS(N(RRRRRst scope_prefixRt func_prefixRtpymethdef_prefixtpymethdef_cnamet is_specialtdoctfuncdoc_prefixt doc_cname(RRRRRstprefix((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs     cCsx|jD]}|js,t|jdn|jr|j|j|j|j|_|jjrqd|j_ nd|j_ n|j |||_d|j_ |j |j_ |jr |j s|jjr|jj rd|j_qq q W|j||j|j||jdS(NsMissing argument nameRii(RQRRRRRR~RERsR=RRRRRdRRtis_declared_generictdeclare_python_argRR(RRR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs"  !    cCsX|rT|j|jtj|j}d|_d|_d|_d|_||_ ndS(NiRi( R~RRR>RRRRRtxdecref_cleanupRs(RRRRs((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR s     cCs*|j||jr&|j|ndS(N(tanalyse_default_valuesRtsynthesize_assignment_node(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!s  cCsx|jD]}|jr |jr|jj||jj|j||_|jj||j|j|_d|j_ qt |j dd|_q q WdS(Nis)This argument cannot have a default value( RQRXRt analyse_typest coerce_toREtallocate_tempstadd_default_valuet default_entryRRRR'(RRR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR"s   cCsddl}t|jd|j|jd|jd|j|jd|jd|j|jd|jj |_ |j j ||j j |dS(NiRRRtrhst class_cnametfunctionR( t ExprNodestSingleAssignmentNodeRtNameNodeRRtUnboundMethodNodetclass_obj_cnametPyCFunctionNodeRsRtassmtRR!(RRR,((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR#s   c Csyg}|jj}|jr2|jdtjnxY|jD]N}|js<|jrk|jd|j q|j|j j |j q<q<W|j r|jdtj tjfndj|}|jj |jj}d||f}|jd||jjr1|jd|jj|jjfn|rd|jd|jj|j|jdn|jd |dS( Ns PyObject *%ssPyObject *%s, PyObject *%ss, s static %s(%s)s %s; /*proto*/sstatic char %s[] = "%s";sstatic PyMethodDef %s = t;s%s {(RsRt has_dummy_argRVRt self_cnameRQRRdRRRR t args_cnamet kwds_cnameRR[RRRRtputRtput_pymethoddef( RR"Rt arg_code_listR Rtarg_codetdcR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs<       cCs4x-|jD]"}|jr |j|jq q WdS(N(RQRtput_var_declarationRs(RRR"R((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs cCs|jjjrg}t}|jdtjxf|jD][}|jr9|jd|j |j r~|j r~d}d}nd}|j |q9q9W|j d|rtj}||_|j d|dj|fqndS( Nsstatic char *%s[] = {s"%s",it1Rs0};sstatic char %s[] = {%s};R(RsRR tFalseR8Rt kwdlist_cnameRQRRRRRXRVRtreqd_kwds_cnametreqd_kw_flags_cnameR(RR"t reqd_kw_flagst has_reqd_kwdsRtflagt flags_name((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs2      cCs\|jdk}|jdk p0|jdk p0|}|jjjs^|rXt|jdqXng}g}d}x|j D]}|j}|j rz|j r|j d|j |jj f|s|jdnd}n#|r|j rt|jdn|jd|j |jj} | r3|j| qMt|jd|jqzqzWd |j} d tj|d } |r|j|ntjtj| tjg|} tj| d } |jd | |rK|j d|jtjt|jtjt|j|j||j|j||j | |j dn |j | dS(Nis.This method cannot have * or keyword argumentss%s = %s;t|is/Non-default argument following default argumentt&s2Cannot convert Python object argument to type '%s's return %s;s"%s"R7s, s&if (!PyArg_ParseTupleAndKeywords(%s)) t{R(RRR'RRsRR RRRQRRXRRSR(RVRREtparsetuple_formatRRRtgenerate_stararg_getting_codeRR6R7R@R8t put_xdecrefRtgenerate_arg_xdecref(RR"thas_kwonly_argsthas_star_or_kw_argst arg_addrst arg_formatst default_seenRt arg_entrytformatterror_return_codet argformatt pt_arglistt pt_argstring((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs`        cCs6|jr2|jtjt|jtjtndS(N(RRLRR6RR7(RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRRs cCs|r|j|jndS(N(tput_var_xdecrefRs(RRR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRMWscCs|rd|jjSdSdS(Ns&%si(RsRS(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyt arg_address[sc Cs|j}t|j||jjj}|j|j}|j|j}|j t |j dt j t jt j||||j|jfdS(NsCif (__Pyx_GetStarArgs(&%s, &%s, %s, %s, %s, %s, %s) < 0) return %s;(RRRQRsRRRZRRRtget_starargs_utility_codeRRR6R7R@RBR(RR"t num_kwonlytnargst star_arg_addrtstarstar_arg_addr((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRKas # cCs4x-|jD]"}|jr |j||q q WdS(N(RQRtgenerate_arg_conversion(RR"R((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRrs cCs|j}|j}|jr.|j||nh|jrJ|j||nL|j|r||jd|jj|j fnt |j d||fdS(Ns%s = %s;s)Cannot convert argument from '%s' to '%s'( RRER=t%generate_arg_conversion_from_pyobjectt#generate_arg_conversion_to_pyobjectRYRRsRSRRR(RRR"told_typetnew_type((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR`ys     cCse|j}|j}|rM|jd|jj||j|j|jfnt|jd|dS(Ns%%s = %s(%s); if (PyErr_Occurred()) %ss2Cannot convert Python object argument to type '%s'( REtfrom_py_functionRRsRSRt error_gotoRR(RRR"Rdtfunc((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRas     cCsn|j}|j}|rV|jd|jj||j|jj|j|jfnt|jd|dS(Ns%s = %s(%s); if (!%s) %ss5Cannot convert argument of type '%s' to Python object( Rtto_py_functionRRsRSRRfRR(RRR"RcRg((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRbs      cCs4x-|jD]"}|jr |j||q q WdS(N(RQRtgenerate_arg_type_test(RR"R((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs cCs|jjr|jj}d|jj}|jt|jd|||jt k|j |j |j f|jdkrt|j ddqnt|j ddS(Ns((PyObject *)%s)s,if (!__Pyx_ArgTypeTest(%s, %s, %d, "%s")) %stor_nonese'not None' will become the default in a future version of Pyrex. Use 'or None' to allow passing None.sICannot test type of extern C class without type object name specification(REttypeobj_is_availablet typeptr_cnameRsRSRtarg_type_test_utility_codeRRR?RRRfRR'RR(RRR"RlR;((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRis     cCsxv|jD]k}|j}|r |j||j||jd|jj|j|jjf|j |q q W|j r|j j |ndS(Ns%s = %s;( RQRXtgenerate_evaluation_codetmake_owned_referenceRR(RSt result_asREtgenerate_post_assignment_codeR2R.(RR"RRX((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s     cCs |jjjS(N(RsRR(R((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCsdS(Ni((R((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRsN("R R$R'R2RRBRRRRR RRR R!R"R#RRRRRRMRZRKRR`RaRbRRiR.RR(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR%s>  %      !   7            tPyClassDefNodecBs5eZdZdZdZdZdZRS(c Cstj||||_||_||_ddl}|j|dg|_|jrs|j|d|j}nd}|j |d|j|d|d|d|jd||_ |j |d||_ dS(Nitkey_value_pairsRRRRtdictR(R/RRRRR4R,tDictNodeRtt StringNodeR't ClassNodetclassobjR.ttarget(RRRRRRR4R,tdoc_node((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs      cCs|jj|dS(N(Rytanalyse_target_declaration(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCs|jj||jj||j}td|jd|}|jj|_|jj|_||_ |j j ||j j||j j ||j|jj|dS(NRRR(RtR!RxRR RRRGtclass_dict_cnameR0RrR4RRytanalyse_target_expressiont release_temp(RRRtcenv((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!s  cCs|jj|j|dS(N(R4R,Rr(RRR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR,s cCsZ|jj||jj||jj||jj|j||jj|dS(N(RtRnRxR4R.Rytgenerate_assignment_codetgenerate_disposal_code(RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s (R R$RRR!R,R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRrs     t CClassDefNodecBs2eZdZdZdZdZdZRS(cCs|jr)|jj r)t|jdnd|_|jdk }|jr5|j rn|j |j |j}n|}|r5|j |j|j}|r2|j st|jd|jq/|j jst|jd|jq/|r |jdkr |j j r t|jd|jq/|j |_q2q5n|jr|jdkr|jjd}|j||j}|sdSn|}|jd|jd|jd |o|jd |o|j d |jd |jd |jd|jd|jd|j |_||k r4|jdkr4|j|j|jtn|jj j}|jr[|j|_n|r|jj||jrd|_qd|_n|j |jdS(NsTObject struct name specification required for C class defined in 'extern from' blocks'%s' is not a type names'%s' is not an extension typeRwsBase class '%s' is incompleteRRRRRt implementingt module_nameR:RxRRztoptionsi(!R3Rtobjstruct_cnameRRR'R:R4tbase_class_nametbase_class_modulet find_moduleRpRqRERRxt is_definedRtsplitRotdeclare_c_classt class_nameRyRRzRstadd_imported_entryRrRRtdefinedt implementedtallocate_vtable_names(RRthas_bodytbase_class_scopetbase_class_entryRlRRr((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR5s\     %            cCs |jr|jj|ndS(N(R4R!(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!ms cCs,|jr(|jr(|jj||ndS(N(RsR4R,(RRR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR,qscCs |jr|jj|ndS(N(R4R.(RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.ws N(R R$R'RsRR!R,R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs  8  t PropertyNodecBs,eZdZdZdZdZRS(cCs>|j|j|j|j}|r:|jj|jndS(N(tdeclare_propertyRRRRR4RRr(RRRs((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCs|jj|dS(N(R4R!(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!scCs|jj||dS(N(R4R,(RRR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR,scCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s(R R$RR!R,R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR~s  t GlobalNodecBs#eZdZdZdZRS(cCs+x$|jD]}|j||jq WdS(N(tnamestdeclare_globalR(RRRR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!scCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s(R R$RR!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs  t ExprStatNodecBseZdZdZRS(cCs$|jj||jj|dS(N(texprR!R~(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!scCs]|jj||jj rI|jjrI|jd|jjn|jj|dS(Ns%s;(RRntis_tempRGRR(RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s(R R$R!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs tAssignmentNodecBseZdZdZRS(cCs+|j||j||j|dS(N(R$tallocate_rhs_tempstallocate_lhs_temps(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!s  cCs|j||j|dS(N(tgenerate_rhs_evaluation_codeR(RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s (R R$R!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs R-cBsAeZdZddZdZdZdZdZRS(cCs|jj|dS(N(RR{(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRsicCsp|jj||jj||jj||jj|jj||_|rl|jj||_ndS(N(R)R$Rtanalyse_target_typestgil_assignment_checkR%REtcoerce_to_temp(RRtuse_temp((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR$s cCs|jj|dS(N(R)R&(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCs|jj||jdS(N(Rtallocate_target_tempsR)(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCs|jj|dS(N(R)Rn(RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCs|jj|j|dS(N(RRR)(RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs(R R$RR$RRRR(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR-s      tAugmentedAssignmentNodecBs#eZdZdZdZRS(cCs|j}|jj||jj||jj}|jrGt}nJ|jrq|dksh|dkrqt }n |dkrt |j ddS|jj |||_dS(Ns+=s-=s**=s/**= operator not supported for non-Python types( toperatorR)R$Rtanalyse_inplace_typesRER=Rtis_ptrRRRR%(RRtopRE((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR$s    !  cCs|jj||jdS(N(Rtallocate_inplace_target_tempsR)(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRscCs |jj|j|j|dS(N(Rt generate_inplace_assignment_codeRR)(RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs(R R$R$RR(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs  tCascadedAssignmentNodecBsAeZdZddZdZdZdZdZRS(cCs%x|jD]}|j|q WdS(N(tlhs_listR{(RRR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRsicCs|jj||r.|jj||_n|jj||_ddlm}g|_x_|jD]T}|j||j |||j}|j |j |}|jj |qfWdS(Ni(t CloneNode( R)R$Rtcoerce_to_simpleR,Rtcoerced_rhs_listRRRR%RERV(RRRRRR)((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR$s   cCs|jj|dS(N(R)R&(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR)scCsWx@t|j|jD])\}}|j||j||qW|jj|dS(N(tzipRRR&RR)R~(RRRR)((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR,s" cCs|jj|dS(N(R)Rn(RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR4scCskxTtt|jD]=}|j|}|j|}|j||j||qW|jj|dS(N(RRRRRnRR)R(RR"RRR)((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR7s    (R R$RR$RRRR(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR s      tParallelAssignmentNodecBs#eZdZdZdZRS(cCs%x|jD]}|j|q WdS(N(R*R(RRR+((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRNscCsYx1|jD]&}|j|dd|j|q Wx|jD]}|j|q>WdS(NRi(R*R$RR(RRR+((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!Rs cCsFx|jD]}|j|q Wx|jD]}|j|q+WdS(N(R*RR(RR"R+((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.Ys(R R$RR!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR@s  t PrintStatNodecBs eZdZdZdZRS(cCsxmtt|jD]V}|j|}|j||j|}|j||j|||j|Integer for-loop variable must be of type int or Python objectii(!R,RyRtbound1R$tbound2tcoerce_to_integerR%R&RRER=RFRRt is_py_targetRsRSt loopvar_nameR'tpy_loopvar_nodetTempNodeR>t c_long_typeR&RGRRRR4R!R~R(RRR,t target_typetc_loopvar_node((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!4sD             c Cse|j}|jj||jj||j|j\}}|jd|j|jj||j|j |jj||jf|j r|j j||j j |j |n|j j||j|j|jd|j}|j||jr4|jd|jj||jdn|j||jj||jj|dS(Ns!for (%s = %s%s; %s %s %s; %s%s) {Rs /*else*/ {(RRRnRtrelation_tablet relation1RRRGt relation2RRyRR4R.RRRRRR(RR"RtoffsettincopR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.`s2        R7s++s<=s+1t=s-1t>(R7s++(s+1s++(R7s--(s-1s--(R R$RR!R.R(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs  , tTryExceptStatNodecBs)eZdZdZdZdZRS(cCs^|jj|x|jD]}|j|qW|jrM|jj|n|j|dS(N(R4Rtexcept_clausesRR(RRt except_clause((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs  cCsk|jj||j|_x|jD]}|j|q'W|jrZ|jj|n|j|dS(N(R4R!tfree_temp_entriest cleanup_listRRR(RRR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!s  sTry-except statementcCs3|j}|j}|j}|jd|jj||jd||_|jr|jd|jj||jdn|j||j||j |j d}xL|j D]A}|j sd}n|rt |jdn|j||qW|s"|j|jn|j|dS(Ns /*try:*/ {Rs /*else:*/ {iisDefault except clause not last(tnew_error_labelRRRR4R.RRRtput_var_xdecrefs_clearRRtpatternRRtgenerate_handling_code(RR"told_error_labeltour_error_labelRtdefault_clause_seenR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.s8          (R R$RR!RR.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs  tExceptClauseNodecBs,eZdZdZdZdZRS(cCsL|jr|jj|n|jr8|jj|n|jj|dS(N(t exc_targetR{t tb_targetR4R(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs   cCs;|j}|j|_|jr~|jj||jj||_|jtj|_ |jj ||j |j ngt dD]}|jt ^q|_ |j||jd|_|j||jd|_|j}t|_|jj||j|_||_x|j D]}|j |q WdS(Niii(RRt function_nameRR!Rt allocate_tempR>Rt match_flagR~txrangeRRtanalyse_targetRRRttb_valueRR?R4(RRRRtold_reraise_usedtvar((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!s$   +    cCsV|rRddl}|j|j||j|}|j||j|||SdS(Ni(R,t ExcValueNodeRRR&R}(RRRytvar_noR,R((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR s   cCs|j|j|jrs|jj||jd|j|jjf|jj||jd|jn |jd|jp|j }|p|j }|r|r|jd|j |j|j fndt |j}|jd||r3|jt|jd||j|jfn|jre|jj||jj|j|n|j r|jj||j j|j|qn|j}|j|_|jj|||_|rx+|jD]}|jd||fqWn|j||jd dS( Ns %s = PyErr_ExceptionMatches(%s);s if (%s) {s /*except:*/ {s%s; __Pyx_AddTraceback("%s");s &%s, &%s, &%ssPyErr_Fetch(%s);s(if (__Pyx_NormalizeException(%s) < 0) %ssPy_XDECREF(%s); %s = 0;R(R-RRRnRR RRRRRt error_setupRRRRt normalize_exception_utility_codeRfRRR R4R.R(RR"Rt any_bindingst exc_vars_usedtexc_argst old_exc_varsR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRsV         (R R$RR!R R(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRs   tTryFinallyStatNodecBsGeZdZdZdZdZdZdZdZdZ RS(iicCs$|jj||jj|dS(N(R4Rtfinally_clause(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR7 scCs>|jj||j|_|jj||j|dS(N(R4R!RRRR(RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!; s sTry-finally statementcCs||j}|j}|j}|j}|j}|jd|jra|j}d|_n|jj||jr||_n|jd|jdg}d} xTt |D]F\} } | |j kr|j | | |krd} | } qqqW|r|jd| rP|j rP|jdt j|jdt jn|j||jd |xh|D]`} || } | |kr|j r|j||| d|qu|jd | | d|fquW|j|n|j|| r|j|j} n|jj|| r| |j kr|j r|j}|j||j| |jd | dx"t jD]}|jd |qW|jd|j||j|n||_n|rk|jd xo|D]g} || }||kr/|j r/|j|| d|q|j||jd| d|fqW|jdn|jddS(Ns /*try:*/ {iRs/*finally:*/ {isint __pyx_why;sPyObject *%s, *%s, *%s;sint %s;s__pyx_why = 0; goto %s;s%s: __pyx_why = %s; goto %s;sif (__pyx_why == %d) {sPy_XDECREF(%s);sswitch (__pyx_why) {scase %s: goto %s;(Rtall_new_labelstget_all_labelsRRt disallow_continue_in_try_finallyRR4R.t enumerateRRVtpreserve_exceptionRRtexc_lineno_namet use_labeltput_error_catcherRtset_all_labelsRRRtput_error_uncatcher(RR"Rt old_labelst new_labelsRt catch_labeltwas_in_try_finallyt cases_usedterror_label_usedRRterror_label_casetfinally_error_labelt over_labelRt old_label((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.C s                              cCs|jd||jd||j|j|jdtj|jdtjtjf|j||jddS(Ns%s: {s__pyx_why = %s;sPyErr_Fetch(&%s, &%s, &%s);s%s = %s;R(RRRRRRt lineno_cnameR(RR"RRR%((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR  s   cCs|jd||jdtj|jdtjtjfx"tjD]}|jd|qLW|j||jddS(Ns case %s: {sPyErr_Restore(%s, %s, %s);s%s = %s;s%s = 0;R(RRRR-RR(RR"RRR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR" s    ( R R$RRRR!RR.R R"(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR s   U t GILStatNodecBs2eZdZdZdZdZdZRS(ic Cs5||_tj||d|dt|d|dS(NR4Rtstate(R/RRt GILExitNode(RRR/R4((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR s cCs>d|j_|j}d|_tj||||_dS(Ni(RRRRR!(RRt was_nogil((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR! s   cCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR scCsn|jd|j|jdkr3|jdn|jd|jdtj|||jddS(Ns/*with %s:*/ {tgils-PyGILState_STATE _save = PyGILState_Ensure();sPyThreadState *_save;tPy_UNBLOCK_THREADSR(RR/RR.(RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR. s  (R R$RRR!RR.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR. s    R0cBseZdZdZRS(cCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR! scCs0|jdkr|jdn |jddS(NR2sPyGILState_Release();tPy_BLOCK_THREADS(R/R(RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR. s(R R$R!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR0 s tCImportStatNodecBs#eZdZdZdZRS(cCsE|j|j|j}d|jkr |jjd}|d}|jj|}|}xV|dD]J}|j|}|j|||j|js|j|n|}qfW|jr|j|j||j|j|qA|j|||j|j|n5|jp|j}|j|||j|j|dS(NRii( RRRRtcontexttfind_submoduletdeclare_moduletas_nametadd_imported_module(RRt module_scopeRttop_namettop_module_scopeRRtsubmodule_scope((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR s(    cCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR! scCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR. s(R R$RR!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR5 s  tFromCImportStatNodecBs,eZdZdZdZdZRS(c CsV|j|j|j}|j|x*|jD]}|j}|j|j}|r|r|j|| r|j tqn|dks|dkr|j |jd|ddddd|j}nS|dkr|j |jd|jd |j}n t |jd |j|jf|r/|jp2|j}|j|||jq/q/WdS( NtstructtunionRRrRiRtclassRs%Name '%s' not declared in module '%s'(RRRR:timported_namesRtlookupRRtdeclaration_matchest redeclaredRR'RRR9R(RRR;timpRRst local_name((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR s&  !  cCsV|js dS|j}|dkr2|jsRdSn |js?dS||jkrRdSdS(NiRBi(RqRERRR(RRsRRE((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRE4 s     cCsdS(N((RR((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!B scCsdS(N((RR"((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.E s(R R$RRER!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR? s   tFromImportStatNodecBs#eZdZdZdZRS(cCs+x$|jD]\}}|j|q WdS(N(RR{(RRRuRy((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRQ scCsddl}|jj||j|j||_|jj|x'|jD]\}}|j|dqNW|jj ||jj |dS(Ni( R,tmoduleR!t PyTempNodeRRRRR}R'R~(RRR,RRRy((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR!U s c Cs|jj|x|jD]u\}}|j|}|jd|jj|jj||jj|j|j f|j |j|qW|jj |dS(Ns*%s = PyObject_GetAttr(%s, %s); if (!%s) %s( RJRnRtinternRRRGRRfRRR(RR"RRRyRS((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyR.a s   (R R$RR!R.(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyRII s  sX typedef struct {PyObject **p; int i; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ sb static int __Pyx_PrintItem(PyObject *); /*proto*/ static int __Pyx_PrintNewline(void); /*proto*/ s static PyObject *__Pyx_GetStdout(void) { PyObject *f = PySys_GetObject("stdout"); if (!f) { PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); } return f; } static int __Pyx_PrintItem(PyObject *v) { PyObject *f; if (!(f = __Pyx_GetStdout())) return -1; if (PyFile_SoftSpace(f, 1)) { if (PyFile_WriteString(" ", f) < 0) return -1; } if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) return -1; if (PyString_Check(v)) { char *s = PyString_AsString(v); Py_ssize_t len = PyString_Size(v); if (len > 0 && isspace(Py_CHARMASK(s[len-1])) && s[len-1] != ' ') PyFile_SoftSpace(f, 0); } return 0; } static int __Pyx_PrintNewline(void) { PyObject *f; if (!(f = __Pyx_GetStdout())) return -1; if (PyFile_WriteString("\n", f) < 0) return -1; PyFile_SoftSpace(f, 0); return 0; } sS static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ s static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { if (value == Py_None) value = NULL; if (tb == Py_None) tb = NULL; Py_XINCREF(type); Py_XINCREF(value); Py_XINCREF(tb); if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } #if PY_VERSION_HEX < 0x02050000 if (!PyClass_Check(type)) #else if (!PyType_Check(type)) #endif { /* Raising an instance. The value should be a dummy. */ if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } /* Normalize to raise , */ value = type; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else type = (PyObject*) type->ob_type; Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } #endif } PyErr_Restore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } sj static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/ s static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type)) return 1; PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, obj->ob_type->tp_name); return 0; } s static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], Py_ssize_t nargs, PyObject **args2, PyObject **kwds2, char rqd_kwds[]); /*proto*/ s static int __Pyx_GetStarArgs( PyObject **args, PyObject **kwds, char *kwd_list[], Py_ssize_t nargs, PyObject **args2, PyObject **kwds2, char rqd_kwds[]) { PyObject *x = 0, *args1 = 0, *kwds1 = 0; int i; char **p; if (args2) *args2 = 0; if (kwds2) *kwds2 = 0; if (args2) { args1 = PyTuple_GetSlice(*args, 0, nargs); if (!args1) goto bad; *args2 = PyTuple_GetSlice(*args, nargs, PyTuple_GET_SIZE(*args)); if (!*args2) goto bad; } else if (PyTuple_GET_SIZE(*args) > nargs) { int m = nargs; int n = PyTuple_GET_SIZE(*args); PyErr_Format(PyExc_TypeError, "function takes at most %d positional arguments (%d given)", m, n); goto bad; } else { args1 = *args; Py_INCREF(args1); } if (rqd_kwds && !*kwds) for (i = 0, p = kwd_list; *p; i++, p++) if (rqd_kwds[i]) goto missing_kwarg; if (kwds2) { if (*kwds) { kwds1 = PyDict_New(); if (!kwds1) goto bad; *kwds2 = PyDict_Copy(*kwds); if (!*kwds2) goto bad; for (i = 0, p = kwd_list; *p; i++, p++) { x = PyDict_GetItemString(*kwds, *p); if (x) { if (PyDict_SetItemString(kwds1, *p, x) < 0) goto bad; if (PyDict_DelItemString(*kwds2, *p) < 0) goto bad; } else if (rqd_kwds && rqd_kwds[i]) goto missing_kwarg; } } else { *kwds2 = PyDict_New(); if (!*kwds2) goto bad; } } else { kwds1 = *kwds; Py_XINCREF(kwds1); if (rqd_kwds && *kwds) for (i = 0, p = kwd_list; *p; i++, p++) if (rqd_kwds[i] && !PyDict_GetItemString(*kwds, *p)) goto missing_kwarg; } *args = args1; *kwds = kwds1; return 0; missing_kwarg: PyErr_Format(PyExc_TypeError, "required keyword argument '%s' is missing", *p); bad: Py_XDECREF(args1); Py_XDECREF(kwds1); if (args2) { Py_XDECREF(*args2); } if (kwds2) { Py_XDECREF(*kwds2); } return -1; } s: static void __Pyx_WriteUnraisable(char *name); /*proto*/ s static void __Pyx_WriteUnraisable(char *name) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; PyGILState_STATE state = PyGILState_Ensure(); PyErr_Fetch(&old_exc, &old_val, &old_tb); ctx = PyString_FromString(name); PyErr_Restore(old_exc, old_val, old_tb); if (!ctx) ctx = Py_None; PyErr_WriteUnraisable(ctx); PyGILState_Release(state); } s; static void __Pyx_AddTraceback(char *funcname); /*proto*/ sr #include "compile.h" #include "frameobject.h" #include "traceback.h" static void __Pyx_AddTraceback(char *funcname) { PyObject *py_srcfile = 0; PyObject *py_funcname = 0; PyObject *py_globals = 0; PyObject *empty_tuple = 0; PyObject *empty_string = 0; PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_srcfile = PyString_FromString(%(FILENAME)s); if (!py_srcfile) goto bad; py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; py_globals = PyModule_GetDict(%(GLOBALS)s); if (!py_globals) goto bad; empty_tuple = PyTuple_New(0); if (!empty_tuple) goto bad; empty_string = PyString_FromString(""); if (!empty_string) goto bad; py_code = PyCode_New( 0, /*int argcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ empty_string, /*PyObject *code,*/ empty_tuple, /*PyObject *consts,*/ empty_tuple, /*PyObject *names,*/ empty_tuple, /*PyObject *varnames,*/ empty_tuple, /*PyObject *freevars,*/ empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ %(LINENO)s, /*int firstlineno,*/ empty_string /*PyObject *lnotab*/ ); if (!py_code) goto bad; py_frame = PyFrame_New( PyThreadState_Get(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = %(LINENO)s; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); Py_XDECREF(empty_tuple); Py_XDECREF(empty_string); Py_XDECREF(py_code); Py_XDECREF(py_frame); } tFILENAMEtLINENOtGLOBALSsE static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ sz static int __Pyx_SetVtable(PyObject *dict, void *vtable) { PyObject *pycobj = 0; int result; pycobj = PyCObject_FromVoidPtr(vtable, 0); if (!pycobj) goto bad; if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0) goto bad; result = 0; goto done; bad: result = -1; done: Py_XDECREF(pycobj); return result; } sF static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/ s static int __Pyx_GetVtable(PyObject *dict, void *vtabptr) { int result; PyObject *pycobj; pycobj = PyMapping_GetItemString(dict, "__pyx_vtable__"); if (!pycobj) goto bad; *(void **)vtabptr = PyCObject_AsVoidPtr(pycobj); if (!*(void **)vtabptr) goto bad; result = 0; goto done; bad: result = -1; done: Py_XDECREF(pycobj); return result; } sB static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ s static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); if (!*t->p) return -1; if (t->i) PyString_InternInPlace(t->p); ++t; } return 0; } sb static int __Pyx_NormalizeException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ sa static int __Pyx_NormalizeException(PyObject **type, PyObject **value, PyObject **tb) { PyErr_NormalizeException(type, value, tb); if (PyErr_Occurred()) goto bad; if (!*tb) { *tb = Py_None; Py_INCREF(*tb); } return 0; bad: Py_XDECREF(*type); Py_XDECREF(*value); Py_XDECREF(*tb); return -1; } (_RtsystCodetErrorsRRRRR>RRRRRtSymtabRR R R R t Pyrex.UtilsR RtOptionst DebugFlagsRRR(R)R/R0R6R9R<RBRMRbReRfRtRvRRRRRRRRRrRRRRRR-RRRRRRRRRRRRRRRRRRRRR.R0R5R?RIt utility_function_predeclarationsRRRmR[Rtfilename_cnameR-t module_cnamettraceback_utility_codetset_vtable_utility_codetget_vtable_utility_codetinit_string_tab_utility_codeR(((s8/usr/lib/python2.7/site-packages/Pyrex/Compiler/Nodes.pyts   (( 6! 7 & *7r >` 6 #  =>,)3g;`"%36) 8  a  :    ' H