pWc@srddlZddlZddlZddlmZmZddlTdZdZdfdYZ d fd YZ d fd YZ d fdYZ dfdYZ dfdYZejdfkrejZndejfdYZdZedZedZdZdZdZdZdZdeededed Zd!ZdS("iNi(t ffiplatformtmodel(t*t0x2601t0x2701t GlobalExprcBs)eZdddZdZdZRS(icCs1||_||_||_||_||_dS(N(tnametaddressttype_optsizet check_value(tselfRRRR R ((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt__init__ s     cCs&d|j|j|jj|jfS(Ns' { "%s", (void *)%s, %s, (void *)%s },(RRRt as_c_exprR (R ((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR scCs d|jj|j|jfS(Ns b'%s%s',%d(Rtas_python_bytesRR (R ((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pytas_python_exprs(t__name__t __module__R R R(((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR s t FieldExprcBs,eZdZdZdZdZRS(cCs1||_||_||_||_||_dS(N(Rt field_offsett field_sizetfbitsizet field_type_op(R RRRRR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR s     cCsOdt|j}d|j|jfd||jfd||jjfS(Nt s { "%s", %s, s %s %s, s %s %s },(tlenRRRRR (R tspaces((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR !s$cCs tdS(N(tNotImplementedError(R ((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR'scCsb|jjtkrd}n*|jjtkr?t|j}ntd|jj||jfS(Nts b'%s%s%s'( RtoptOP_NOOPt OP_BITFIELDtformat_four_bytesRRRR(R t size_expr((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pytas_field_python_expr*s (RRR R RR!(((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRs   tStructUnionExprcBs#eZdZdZdZRS(c CsL||_||_||_||_||_||_||_||_dS(N(Rt type_indextflagsR t alignmenttcommenttfirst_field_indextc_fields( R RR#R$R R%R&R'R(((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR 6s       cCsfd|j|j|jfd|j|jfd|jt|jf|jr]d|jnddS(Ns { "%s", %d, %s,s %s, %s, s%d, %d s /* %s */ Rs},( RR#R$R R%R'RR(R&(R ((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR AscCsct|jt}g|jD]}|j^q}dt|jt||jdj|fS(Ns(b'%s%s%s',%s)t,( tevalR$tG_FLAGSR(R!RR#Rtjoin(R R$tc_fieldt fields_expr((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRHs  (RRR R R(((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR"5s tEnumExprcBs#eZdZdZdZRS(cCs1||_||_||_||_||_dS(N(RR#R tsignedtallenums(R RR#R R0R1((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR Ss     cCs&d|j|j|j|j|jfS(Ns1 { "%s", %d, _cffi_prim_int(%s, %s), "%s" },(RR#R R0R1(R ((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR Zs cCswitd6td6td 6td 6td 6td 6td 6td6|j|j f}dt |j t ||j |j fS(Niiiiisb'%s%s%s\x00%s'(ii(ii(ii(ii(ii(ii(ii(ii(t PRIM_UINT8t PRIM_INT8t PRIM_UINT16t PRIM_INT16t PRIM_UINT32t PRIM_INT32t PRIM_UINT64t PRIM_INT64R R0RR#RR1(R t prim_index((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR_s (RRR R R(((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR/Rs  t TypenameExprcBs#eZdZdZdZRS(cCs||_||_dS(N(RR#(R RR#((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR ks cCsd|j|jfS(Ns { "%s", %d },(RR#(R ((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR oscCsdt|j|jfS(Nsb'%s%s'(RR#R(R ((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRrs(RRR R R(((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR;js  t RecompilercBseZdZedZdZdZdZddddd gZd Z d d Z d Z dZ dZ dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd ZdKd!Z d"Z!d#Z"e"Z#d$Z$d%Z%e%Z&d&Z'e'Z(d'Z)d(Z*d)Z+dKd*dKd+Z,d,Z-d-Z.d.Z/d/Z0dKd0Z1d1Z2d2Z3d3Z4d4Z5d5Z6d6Z7d7Z8d8Z9d9Z:d:Z;e;Z<Z=d;Z>d<Z?d=Z@d>ZAd?ZBeBZCZDd@ZEdAZFdBZGdCZHdDZIdEZJdFZKeKZLeKZMdGZNdHZOdIZPePZQdJZRRS(LicCs||_||_||_dS(N(tffit module_namettarget_is_python(R R=R>R?((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR |s  c Csi|_|jdt|jdt}g|_x|D]}|jr;|j|dksctt|j|j|<|jj |x|j D]u}t |t j t jt jt jt jfst|j|dkrt|j|j|scSs|jS(N(R(RD((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyREst_emit_bytecode_(t _typesdictt _generatetsortedtstrt cffi_typestis_raw_functiontNonetAssertionErrorRtappendtargst isinstanceRtVoidTypetBasePrimitiveTypet PointerTypetStructOrUnionOrEnumtFunctionPtrTypet is_array_typetlengthtvaluest_struct_unionst_enumst StructOrUniontEnumTypet enumeratetgetattrt __class__RtCffiOpttuple(R t all_declsRDttp1titmethodR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pytcollect_type_tablesZ           cCs6t|tjsFt|trBx|D]}|j|q(WndS||jkr2d|j|||_|j}|jd}|jd}|jd|||d+|dj||jjdd}|jjdk r?|d|jf|d |j |jjf|d |d |f|d |d |f|d|d|f|d|jd}|dj|t }nt }|d|||||d||dt g|jjD]\}}||f^q} xct|jD]R\}} d} || krd| |j} n|d|| j| fqW|js2|dn|d|t|_|jdi} x|jD]|} |j| }t|| | <| | dkrl|d| | fx|D]}||jqW|d|qlqlW|jjr|dx|jjD]|}y|jd \}}Wn-tk r[tjd|j|fnX|dkrztjdn|d|fqW|d |d|n|d!|d"x@|jD]5} | | dkr|d#| q|d$| qWx8|jD]-} | d%kr|d&| | | fqqW|jjrX|d'n |d(|d)t|jfd}|jr|dO}n|d*||d||d |d+|d,|f|d-|jr|d.|d/|d0n|d1||d2|d3|d4|d5|d6|d7|f|d8|d9|f|d:|d:|d |d+|d;|f|d-|d<|j|f|d3|d|d+|d=|f|d-|d>|j|f|d3|ddS(?Ns_cffi_include.hs#include "parse_c_type.h" sparse_c_type.hiRt.is#define _CFFI_MODULE_NAME "%s"s%#define _CFFI_PYTHON_STARTUP_CODE %ss#ifdef PYPY_VERSIONs5# define _CFFI_PYTHON_STARTUP_FUNC _cffi_pypyinit_%ss#elif PY_MAJOR_VERSION >= 3s-# define _CFFI_PYTHON_STARTUP_FUNC PyInit_%ss#elses*# define _CFFI_PYTHON_STARTUP_FUNC init%ss#endifs _embedding.hs>/************************************************************/sstatic void *_cffi_types[] = {s // s/* %2d */ %s,%ss 0s};tdeclis.static const struct _cffi_%s_s _cffi_%ss[] = {s.static const char * const _cffi_includes[] = {isQffi object %r includes %r, but the latter has not been prepared with set_source()sMnot implemented yet: ffi.include() of a Python-based ffi inside a C-based ffis "%s",s NULLs?static const struct _cffi_type_context_s _cffi_type_context = {s _cffi_types,s _cffi_%ss,s NULL, /* no %ss */Rs %d, /* num_%ss */s _cffi_includes,s NULL, /* no includes */s %d, /* num_types */s %d, /* flags */tPyMODINIT_FUNCs"_cffi_pypyinit_%s(const void *p[])t{s% if (((intptr_t)p[0]) >= 0x0A03) {sQ _cffi_call_python_org = (void(*)(struct _cffi_externpy_s *, char *))p[1];s }s p[0] = (const void *)%s;s p[1] = &_cffi_type_context;t}s# ifdef _MSC_VERs PyMODINIT_FUNCs# if PY_MAJOR_VERSION >= 3s% PyInit_%s(void) { return NULL; }s# elses init%s(void) { }s# endifsPyInit_%s(void)s3 return _cffi_init("%s", %s, &_cffi_type_context);s init%s(void)s, _cffi_init("%s", %s, &_cffi_type_context);( RRRtindexR,R>RvR=t _embeddingRMt_string_literaltVERSION_EMBEDDEDtVERSIONtdictRGRuR^RKt _get_c_nameR Rt_seen_constantsRHRRRt_included_ffist_assigned_sourceRwRRxt _num_externpy(R RRtprntRRetbase_module_nametversionRDttypeindex2typeRR&tnumsR|R}Rtffi_to_includetincluded_module_nametincluded_sourceR$((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRs              4 !                                                cCst|trd|fSt|ttfrg|D]}|j|^q6}t|dkrs|jdnddj|fS|jS(Nsb'%s'iRs(%s)R)( RQRJtlistRbt_to_pyRROR,R(R Rqtitemtrep((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRs "cCsH||_|j}|d|dt|jjp8d}xt|D]}|jj|}y|jd \}}Wn-tk rtj d|j|fnX|dk rtj dn|d||fqKW||d|j f|dt ft |j|_g|jD]}|j^q&} |d |jd j| ftg|jjD]\} }|| f^qt} x\|jD]Q} |j| } t| d kr| d kr|d | |j| fqqW|d kr:|ddjgt|D]}d|^qfn|ddS(Ns# auto-generated filesimport _cffi_backendisQffi object %r includes %r, but the latter has not been prepared with set_source()sMnot implemented yet: ffi.include() of a C-based ffi inside a Python-based ffisfrom %s import ffi as _ffi%dsffi = _cffi_backend.FFI('%s',s _version = %s,s _types = %s,RiRs _%ss = %s,s _includes = (%s,),s, s_ffi%dt)((RRRR=RtrangeRRwRRxRMR>RRbRKRRR,RRGRuRR(R RRt num_includesReRRRRt types_lstRDRR|R}((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRs@       "#4 $ 4cCs |j|S(N(RG(R ttype((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt _gettypenumscCsd}t|tjr|jrI|jdkrId}d|j}nSt|tjrtd|jdf}n(d|jd|jjddf}d }nt|tjr|j ||||dSt|tj tj fr$|j d ||j ||f|j d |dSt|tjred |jd}d |j |}d}n t||j d||||f|j d||jd|f|j d |dS(NRt_Boolt_cffi_to_c_ints, %ss(%s)_cffi_to_c_doubles(%s)_cffi_to_c_%sRRss-1s6 if (_cffi_to_c((char *)&%s, _cffi_type(%d), %s) < 0)s %s;s(%s)_cffi_to_c_pointers, _cffi_type(%d)tNULLs %s = %s(%s%s);s' if (%s == (%s)%s && PyErr_Occurred())(RQRRStis_integer_typeRtUnknownFloatTypet get_c_nametreplaceRTt"_convert_funcarg_to_c_ptr_or_arrayR\R]RRRVR(R RDtfromvarttovarterrcodetextraargt converterterrvalue((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_convert_funcarg_to_cs8       cCs&t|tjr"|jdndS(NsPy_ssize_t datasize(RQRRTtadd(R RDt localvars((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_extra_local_variablesscCs|jd|jd|j|||f|jd|jd|jd||jd||jdf|jd|f|jd ||j||f|jd||jd dS( Ns1 datasize = _cffi_prepare_pointer_call_argument(s( _cffi_type(%d), %s, (char **)&%s);s if (datasize != 0) {s if (datasize < 0)s %s;s& %s = (%s)alloca((size_t)datasize);Rs, memset((void *)%s, 0, (size_t)datasize);sL if (_cffi_convert_array_from_object((char *)%s, _cffi_type(%d), %s) < 0)s }(RRR(R RDRRR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRs      cCst|tjr|jr/d||jfSt|tjrLd|fS|jdkrxd|jjdd|fSd||j|fSnt|tjtj frd||j|fSt|tj rd||jtj|j fSt|tj rP|j dkr9td |j|fnd ||j|fSt|tjryd||j|fSt|dS( Ns_cffi_from_c_int(%s, %s)s_cffi_from_c_double(%s)s long doubles_cffi_from_c_%s(%s)RRss/_cffi_from_c_deref((char *)&%s, _cffi_type(%d))s0_cffi_from_c_pointer((char *)%s, _cffi_type(%d))s!'%s' is used as %s, but is opaques0_cffi_from_c_struct((char *)&%s, _cffi_type(%d))(RQRRSRRRRRRTRVt ArrayTypeRt StructTypetfldnamesRMt TypeErrorRR]R(R RDtvartcontext((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_convert_expr_from_c,s2   cCs|j|dS(N(Ri(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt!_generate_cpy_typedef_collecttypeLscCsdS(N((R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_typedef_declOscCs.|j|}|jdjt||dS(NR(RGRROR;(R RDRR#((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt _typedef_ctxRs cCs|j||t|dddkrD|j||jddn=t|tjr|j|j|jjd|jd|ndS(Ntorigint unknown_typet approxnamet named_ptr( RR_RMt _struct_ctxRRQRtNamedPointerTypettotype(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_typedef_ctxVs !cCs:|j|j|jr6|j r6|j|ndS(N(RiRjtellipsisR?(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt"_generate_cpy_function_collecttypeascCs|j stt|tjs(t|jrE|j||dS|j}t|j }|dkrrd}n|dkrd}nd}g}g}d|}xKt |j D]:\} } |j | j d| ||j d| qWd j |} | p d } |jr%|jd } nd } d | || f} |d|jj | f|dd j |}d}t|jtjrd }n|d|||f|d|d|d|d||f|dd|}xAt |j D]0\} } | j d| |}|d|qWt}x!|j D]} |j| |qLWx|D]}|d|fqmWt|jtjsd}d|}d|jj d|}||n d}d }t|j dkrtt|j }x|D]} |d| qW|d||dt||f|d|dx%|D]} |d| | fqnWn|xBt |j D]1\} } |j| d | d| d!|qW|d"|d#gtt|j D]} d| ^q}d j |}|d$|||f|d%|d&||d'|dkr|d(n|r|d)|j|jd*d+n|d,|d-|d|d.t}g}g}d|}xt |j D]s\} } d }t| tjr/d/}t}n| j d0|| f|}|j ||j d1|| fqW|j}t|tjrd|}|j d2|}|jd|tj}d}d3}t}n|rd j |} | pd } d4| || f} |d|j | f|d|rC||nd j |}|d$|||f|r||d5n|dn|d6||f|d7|dS(8Nitnoargitarg0RPsargument of %ss x%dsx%ds, tvoidRRs%s_cffi_d_%s(%s)s static %sRsreturn s %s%s(%s);Rs#ifndef PYPY_VERSIONsstatic PyObject *s(_cffi_f_%s(PyObject *self, PyObject *%s)s %s;s result = s result of %ss results PyObject *arg%d;s PyObject **aa;s) aa = _cffi_unpack_args(args, %d, "%s");s if (aa == NULL)s return NULL;s arg%d = aa[%d];sarg%ds return NULLs Py_BEGIN_ALLOW_THREADSs _cffi_restore_errno();s { %s%s(%s); }s _cffi_save_errno();s Py_END_ALLOW_THREADSs (void)self; /* unused */s (void)noarg; /* unused */s return %s;tresults result types Py_INCREF(Py_None);s return Py_None;s#elseRs %sx%ds%sx%ds *results *result = s%s_cffi_f_%s(%s)s return result;s# define _cffi_f_%s _cffi_d_%ss#endif(R?RNRQRRVRt_generate_cpy_constant_declRRRPR^RORR,tabiRRRRRRMRRRtFalseR\tTruetinsertt void_type(R RDRRtnumargstargnamet argumentstcall_argumentsRReRtrepr_argumentsRtname_and_argumentst result_codetargRRt result_decltrngt differencet indirectiont tp_result((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_function_declfs                            ,                        c Cs|jr'|j r'|j||dS|j|j}t|j}|jr[t}n0|dkrpt}n|dkrt }nt }|j dj t |d|t||dd|dS(NiiRs _cffi_f_%sR s _cffi_d_%s(RR?t_generate_cpy_constant_ctxRGRjRRPtOP_DLOPEN_FUNCtOP_CPYTHON_BLTN_NtOP_CPYTHON_BLTN_OtOP_CPYTHON_BLTN_VRRORRa(R RDRR#Rt meth_kind((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_function_ctxs         cCs~t|tjrz|j}|dkrI|jd}d||f}n|j|d||j}tj||}n|S(Ns...Rs_cffi_array_len(((%s)0)->%s)s%s[0](RQRRRXRRoR(R t tp_structt field_namettp_fieldt actual_lengthtptr_struct_namettp_item((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRos   cCs|j|dS(N(Ri(R RD((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_struct_collecttype sc Cs|jdkrdS|j}d|f}|d|d||f|d|d|dx|jD]\}}}} y|js|dkr|d|||fwrnxGt|tjr|jdks|jd kr|j }|d }qW|d |j d d |d| |fWqrt j k r]} |dt | qrXqrW|d|d||f|dS(Ns_cffi_checkfld_%st_CFFI_UNUSED_FNsstatic void %s(%s *p)Rs8 /* only to generate compile-time warnings or errors */s (void)p;is? (void)((p->%s) << 1); /* check that '%s.%s' is an integer */s...s[0]s { %s = &p->%s; (void)tmp; }s*tmpsfield %rR~s /* %s */Rs(struct _cffi_align_%s { char x; %s y; };(RkRMRRnRRQRRRXRRRRxRJ( R RDtcnameRRt checkfuncnametfnametftypeRtfqualR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt _struct_decl#s6        cCsi|j|}d}g}t|tjr;|jdn|jdkr`|jdd}n||jjj kr|dks||jjj kr|jdkrn%|j s|j rn |jd|j r|jdqn|jdd}dj |pd }g}|dkr t|j} xC| D];\} } } } |j|| | } t}| d krt}d | }nd|dkst| tjr| jdkrd }n.d |dkr|jdn|j| f}|dks| d kr d }n;|dk r/d|j| f}nd|jd| f}|jt| ||| t||j| q<Wt|jd}|jdj||dkrd}d}d}q#|dk rd|jf}d}nd|f}d|f}d}nd }d}d}|}|jdjt|j||||||||jj|dS(Nt _CFFI_F_UNIONt_CFFI_F_OPAQUEtopaquet_CFFI_F_CHECK_FIELDSt_CFFI_F_PACKEDt_CFFI_F_EXTERNALtexternalt|t0is %d /* bits */s (size_t)-1ssizeof(((%s)0)->%s)Rs"((char *)&((%s)0)->%s) - (char *)0soffsetof(%s, %s)RRs (size_t)-2itunnamedssizeof(*(%s)0)s-1 /* unknown alignment */s sizeof(%s)s"offsetof(struct _cffi_align_%s, y)iR(RGRMRQRt UnionTypeRORkR=RlRmtpartialthas_anonymous_struct_fieldstpackedR,RRnRoRRRRXRRRRaRRtextendR"RR(R RDRRRR#treason_for_not_expandingR$R(RntfldnametfldtypeRRRR toffsetR'talignR&((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRDs                        cCst|jj}|jddx|D]\}}||jkr/|jritd|fn|jjdr|jdj r|jd}nJ|jdkr|j dkrd}|j |dntd|f|j |d|q/q/WdS( NRAcSs|dS(Ni((ttp_order((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyREssDinternal inconsistency: %r is partial but was not seen at this pointt$it_IO_FILEtFILEsinternal inconsistency: %r(RRZRuRRR%RRt startswithtisdigitt forcenameRRRM(R R}RDtorderR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRs % cCs|j|dS(N(R(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt _generate_cpy_struct_collecttypescCsC|jd}d|kr1||jddfS|d|fSdS(NRRRs(RR(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt _struct_namess cCs|j||j|dS(N(RR7(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_struct_declscCs|j||j|dS(N(RR7(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_struct_ctxscCs6t|tjr%|j||n |j|dS(N(RQRR]t_generate_cpy_enum_collecttypeR(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt#_generate_cpy_anonymous_collecttypescCs=t|tjr"|j|n|j||d|dS(Nttypedef_(RQRR]t_generate_cpy_enum_declR(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_anonymous_declscCs@t|tjr%|j||n|j||d|dS(NR<(RQRR]t _enum_ctxR(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_anonymous_ctxstconstcCs\||f|jkr1tjd||fn|jj||f|j}d||f}|r|d||d|d|f|d||f|dk r|dkrd|f}n|d |f|d n|d |d nQ|dkst|d ||d|d|jd|f|d |dS(Ns duplicate declaration of %s '%s's _cffi_%s_%ss$static int %s(unsigned long long *o)Rs int n = (%s) <= 0;sJ *o = (unsigned long long)((%s) << 0); /* check that %s is an integer */is%dUs" if (!_cffi_check_int(*o, n, %s))s n |= 2;s return n;Rsstatic void %s(char *o)s *(%s)o = %s;R(RRRxRRRMRNR(R tis_intRRDtcategoryR Rtfuncname((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_consts2         cCs0|j}| s|jr,|j|ndS(N(RR?Ri(R RDRRB((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt"_generate_cpy_constant_collecttypes cCs#|j}|j|||dS(N(RRE(R RDRRB((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRs cCs|j r(|jr(ttd}n4|jr:t}nt}|j|}t||}|jdjt |d||dS(NiRs_cffi_const_%s( R?RRatOP_CONSTANT_INTtOP_DLOPEN_CONSTt OP_CONSTANTRGRROR(R RDRRt const_kindR#((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRs    cCs|j|dS(N(Ri(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR: scCs(x!|jD]}|jt|q WdS(N(t enumeratorsRER(R RDRt enumerator((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR=sc CsH|j|}ttd}|jr2|jnxMt|j|jD]6\}}|jdj t |d||d|qHW|dk rd|kr|j rd|}d|}nN|j |j g} |j j| }tt|j j| ddk}d j|j} |jd j t|j|||| dS( NiRs_cffi_const_%sR R/s sizeof(%s)s ((%s)-1) <= 0iR)R(RGRatOP_ENUMR?tcheck_not_partialtzipRKt enumvaluesRRORRMtbuild_baseinttypeR=tsizeoftinttcastR,R/R( R RDRR#RRLt enumvalueR R0tbasetpR1((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR?s"   " "  ' cCs|j||jdS(N(R?R(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_enum_ctx(scCsdS(N((R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_macro_collecttype.scCs5|dkrd}n|}|jt|d|dS(Ns...R (RMRER(R RDRR ((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_macro_decl1s  cCsz|dkr7|jr.tjd|fnd}n|}ttd}|jdjt|d||d|dS(Ns...sGcannot use the syntax '...' in '#define %s ...' when using the ABI modeiRs_cffi_const_%sR ( R?RRxRMRaRGRROR(R RDRR R((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_macro_ctx8s    cCsit|tjre|j}|dkr7d|f}n|j|jd|}tj||}n|S(Ns...s_cffi_array_len(%s)s%s[0](RQRRRXt _global_typeR(R RDt global_nameRR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR[Is  cCs|j|j||dS(N(RiR[(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt"_generate_cpy_variable_collecttypeRscCs|j}|j||}t|tjrN|jdkrN|j}d}nd}d|f}|d|j|d|j |d|d||f|d|dS( NRt&s*_cffi_var_%s(void)sstatic R~Rs return %s(%s);R( RR[RQRRRXRMRRRy(R RDRRt ampersandR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_variable_declUs !      cCsh|j||}|j|}|jr1t}nt}|jdjt|d|t||dS(NRs _cffi_var_%s( R[RGR?t OP_GLOBAL_VARtOP_GLOBAL_VAR_FRRORRa(R RDRR#R((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_variable_ctxls    cCs)t|tjst|j|dS(N(RQRRVRNRi(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt'_generate_cpy_extern_python_collecttypeyscCs|j}t|jtjr'd}n&d|}d|jjd|f}|d||d||f|g}d|}x@t|jD]/\}} | jd||} |j| qWd j |} | pd } d || f} |j d krd | } nd} t t |jdd}| |jrVt |d}nt|jtj rd|jjd||jjd|f}n|d||jj| f|d|d||dxt|jD]t\}} d|} t| tj s"| | r>d| } tj| } n|d| jd|d| fqW|d|t|jtjs|d|jjdfn|d||jd7_dS(NR"s result of %ss(int)sizeof(%s)Rs3static struct _cffi_externpy_s _cffi_externpy__%s =s { "%s", %s };sargument of %ss a%ds, Rs%s(%s)t __stdcalls_cffi_stdcall cSst|tjo|jdkS(Ns long double(RQRt PrimitiveTypeR(RD((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pytmay_need_128_bitssiis!sizeof(%s) > %d ? sizeof(%s) : %ds%s%sRs char a[%s];s char *p = a;sa%dR^s *(%s)(p + %d) = %s;Rs, _cffi_call_python(&_cffi_externpy__%s, p);s return *(%s)p;Ri(RRQRRRRRR^RPROR,RtmaxRR\RTR(R RDRt tag_and_spaceRtsize_of_resultRRReRRRRRgt size_of_a((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_extern_python_declsX             (  cCs|j||ddS(Nsstatic (Rl(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt _generate_cpy_extern_python_declscCs|j||ddS(NsCFFI_DLLEXPORT (Rl(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt#_generate_cpy_dllexport_python_declscCs|j||ddS(NR(Rl(R RDR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt'_generate_cpy_extern_python_plus_c_declscCsz|jrtjdn|jr3tdn|j|}tt|}|jdj t |d|||dS(Ns,cannot use 'extern "Python"' in the ABI modes$a vararg function is extern "Python"Rs&_cffi_externpy__%s( R?RRxRRRGRatOP_EXTERN_PYTHONRROR(R RDRR#R((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_generate_cpy_extern_python_ctxs     c Csrd}g}xS|jtp'dgD]9}|jddjg|D]}||^qDq(Wdj|S(NcSsR|dkrd|Sd|ko+dknr4|S|dkrDdSdt|S(Ns\"?s\Rss s\ns\%03o(tord(tc((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt _char_reprs  Rs"%s"s \ (t splitlinesRROR,(R tsRtRtlineRs((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyRs  7cCsttt|j| 0, float => 1 */ )(RRaRxRK(R RDRRv((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_emit_bytecode_UnknownFloatTypescCs tt|j|j|j|<|d7}xr|jD]g}|j|}||krt|tjrx|j ||qtt ||j|R@RERFRRR:R=R?RWRXRYRZR[R]R`RcRdt*_generate_cpy_dllexport_python_collecttypet._generate_cpy_extern_python_plus_c_collecttypeRlRmRnRoRqt"_generate_cpy_dllexport_python_ctxt&_generate_cpy_extern_python_plus_c_ctxRRzR|R}R~RRt_emit_bytecode_ConstPointerTypet_emit_bytecode_NamedPointerTypeRRRt_emit_bytecode_UnionTypeR(((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR<ys  :       3  (         ! N                        5              itNativeIOcBseZdZRS(cCs;t|tr!|jd}ntt|j|dS(Ntascii(RQtunicodetencodetsuperRR(R Rv((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR(s(RRR(((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyR'sc CsX|rd|fGHnt||d|dk}|j|jt}|j|||j}yVt|d/}|jt |d|krt nWdQX|rdGHnt SWnt k rSd|t j f} t| d}|j|WdQXyt j| |Wn.tk rNt j|t j| |nXtSXdS(Ns generating %sR?Ris(already up-to-date)s%s.~%dtw(R<RMRgRRRtgetvalueRtreadRtIOErrorRRtgetpidRtrenametOSErrortunlinkR( R=R>Rt target_filetverboset recompilerRtoutputtf1ttmp_file((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_make_c_or_py_source-s4        cCs(|dk stt|||||S(N(RMRNR(R=R>Rt target_c_fileR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt make_c_sourceIscCst||d||S(N(RRM(R=R>ttarget_py_fileR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pytmake_py_sourceNscCsp|jd}y$tjtjj||d Wntk rFnX|dc|7Rttmpdirtcall_c_compilertc_filetsource_extensiontextradirtcompiler_verboseRRt embeddingRt ext_c_filetexttupdatedRtcwdtoutputfilenameRs((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt recompilesV                 c OsPddlm}ddl}|tjks>td|f|jdt|t|||||}|j ||}xit |j D]X} | j dst |j | } | t || tk rt|| | qqqWd} | |_xJt |D]<} | j d r t|j |  r t|| tq q W|jS(Ni(tudirsmodule name conflict: %rRRsc_s tdS(N(R(RPR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyttypeof_disableds(t testing.udirRtimpRtmodulesRNt setdefaultRJRt load_dynamictdirR=R2R_tobjectRt_typeofthasattrtNotImplementedtlib( R=R>RRPRRRRtmoduleRtattrR((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyt_verifys$    #( RRtioRRRt cffi_opcodeRRRRR"R/R;R<t version_infotStringIORtBytesIORRRRRRRRRRRMRR(((s5/usr/lib64/python2.7/site-packages/cffi/recompiler.pyts:$           5