Zc@`srddlmZddlmZddlmZddlmZddlZddlZddlZddlm Z ddlm Z dd lm Z dd l m Z dd lmZdd lmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&d e'fdYZ(de)fdYZ*dS(i(tabsolute_import(tdivision(tprint_function(tunicode_literalsNi(tast(tmessage(tutils(t CacheStore(t GIRParser(t SourceSymbolt ctype_namet CTYPE_POINTERtCTYPE_BASIC_TYPEt CTYPE_UNIONt CTYPE_ARRAYt CTYPE_TYPEDEFt CTYPE_VOIDt CTYPE_ENUMtCTYPE_FUNCTIONt CTYPE_STRUCTtCSYMBOL_TYPE_FUNCTIONtCSYMBOL_TYPE_TYPEDEFtCSYMBOL_TYPE_STRUCTtCSYMBOL_TYPE_ENUMtCSYMBOL_TYPE_UNIONtCSYMBOL_TYPE_OBJECTtCSYMBOL_TYPE_MEMBERtCSYMBOL_TYPE_ELLIPSIStCSYMBOL_TYPE_CONSTtTYPE_QUALIFIER_CONSTtTYPE_QUALIFIER_VOLATILEtTransformerExceptioncB`seZRS((t__name__t __module__(((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyR-st TransformercB`s6eZedZedddZdZdZdZdZ dZ dZ d Z d Z d Zd Zd ZdZed7dZedZdZdZedZdZdZdZdZdZd7d7dZdZdZ dZ!dZ"dZ#dZ$d Z%d7d!Z&d"Z'd#Z(eed$Z)d7ed7d%Z*eeed7d&Z+d'Z,d(Z-d)Z.ed*Z/d+Z0d,Z1d-Z2d.Z3ed/Z4d0Z5d1Z6d2Z7d3Z8d4Z9d5Z:d6Z;RS(8cC`s|jS(N(t _namespace(tself((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt2sucC`smt|_||_||_t|_i|_i|_g|_t |_ ||_ ||_ i|_ dS(N(Rt _cachestoret_accept_unprefixedR#tsett_pkg_config_packagest _typedefs_nst_parsed_includest _includepathstFalset_passthrough_modet_identifier_filter_cmdt_symbol_filter_cmdt_tag_ns(R$t namespacetaccept_unprefixedtidentifier_filter_cmdtsymbol_filter_cmd((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt__init__4s          cC`s|jS(N(R)(R$((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pytget_pkgconfig_packagesFscC`s d|_dS(N(tNoneR&(R$((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt disable_cacheIscC`s t|_dS(N(tTrueR.(R$((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pytset_passthrough_modeLscC`s|jj|j}t|tjr<t|tjr<nk||krKn\|rt}|j|j|j|jt j d|jf|n|jj |dS(NuNamespace conflict for '%s'( R#tgettnamet isinstanceRtConstantR(tupdatetfile_positionsRtfataltappend(R$tnodetoriginalt positions((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt_append_new_nodeOs$   cC`s@x|D]}|jdkr"qny|j|}Wn&tk r]}tj||qnX|r}|jr}|j|nt|tj r|j r|j |j kr||j |j RtCompoundttag_nameR1titemststrip_identifiert warn_node(R$tsymbolstsymbolRDteRLtstructR=((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pytparsefs*   cC`st||_dS(N(tlistR,(R$tpaths((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pytset_include_pathsscC`sI||jjkrdS|jjj||j|}|j|dS(N(R#tincludestaddt _find_includet_parse_include(R$tincludetfilename((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pytregister_includes cC`stjj|}|jds7td|fn|d }tjj|}||jj kridS|jj j ||j |dt dS(Nu.giru8Include path '%s' must be a filename path ending in .girit uninstalled( tostpathtbasenametendswitht SystemExitRtIncludet from_stringR#RXRYR[R:(R$t include_pathRbtgirnameR\((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pytregister_include_uninstalleds cC`sd|kr|jj|S|jdd\}}||jjkrV|jj|S||jjkr||jkrtjdd||f|jj|S|j|}|j|SdS(uGiven a name of the form Foo or Bar.Foo, return the corresponding ast.Node, or None if none available. Will throw KeyError however for unknown namespaces.u.iu#Deprecated reference to identifier uprefix %s in GIName %sN(R#R<tsplitR=tidentifier_prefixesR+Rtwarn(R$R=tnstginameR\((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt lookup_ginames !  cC`s|jr|j|jSdS(uiGiven a Type object, if it points to a giname, calls lookup_giname() on the name. Otherwise return None.N(t target_ginameRoR8(R$ttypeobj((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pytlookup_typenodes cC`s<tj}|jttjdkr8|jdn|S(Nuntu /usr/share(Rtget_system_data_dirsRCtDATADIRR`R=(R$t data_dirs((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt_get_gi_data_dirss   cC`s|j}x0|jD]"}|jtjj|dqW|jtjjtdd|j|jf}x9|D]1}tjj||}tjj |rv|SqvWt j j d||ft j ddS(Nugir-1.0u %s-%s.giru/Couldn't find include '%s' (search path: '%s') i(R,RvRCR`RatjoinRtR=tversiontexiststsyststderrtwritetexit(R$R\t searchdirsRaRhtd((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRZs    cC`sd|d}|dk r(|j|n|j|j|}|j|_|j|jj=|S(N(R8RWR;R[t get_namespaceR#R+R=(tclsR]textra_include_dirsR$tparser((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pytparse_from_girs   cC`sd}|jdk r*|jj|}n|dkr~td|j }|j||jdk r~|jj||q~nxH|jjD]7}|j |j kr|j |}|j |qqW|sx*|jj D]}|jj|qWn|j}||j |j <|S(Nt types_only(R8R&tloadRR.RTtstoreRRXR=R+RZR[texported_packagesR)RY(R$R]R_RR\t dep_filenametpkgR2((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyR[s$   cc`s+|jVx|jjD] }|VqWdS(uZReturn an iterator over all included namespaces; the currently-scanned namespace is first.N(R#R+tvalues(R$Rm((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt_iter_namespacesscC`s3|d|jkr!d|dfSd|dfSdS(uKey sort which ensures items in self._namespace are last by returning a tuple key starting with 1 for self._namespace entries and 0 for everythin else. iiiN(R#(R$tval((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt _sort_matchessc C`s | r|jrtj|jdtjdtjdtjdt}|}|j|j\}}|jrtd|j|j|fn|j d}ng}g}x|j D]} |r| j } n%|dj r| j } n | j} | rnx{| D]c} | r.| jd r.| d} n|j| r|j| |t| t| fPqqWq|j| qW|r|jd |jttd |S|jr|j|fgS|rx*|D]} || kr| |fgSqWntd |r d nd |fdS(NtstdintstdoutR{tshellu&filter: "%s" exited: %d with error: %suasciiiu_tkeycS`s|d|dfS(Nii((tx((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyR%#suUnknown namespace for %s '%s'u identifierusymbol(R0t subprocesstPopentPIPER:t communicatetencodet returncodet ValueErrortdecodeRRktisuppert_ucase_symbol_prefixestsymbol_prefixesRct startswithRCtlentsortRRUtmapR'R#( R$R=t is_identifiertproct_namet proc_nameterrtmatchestunprefixed_namespacesRmtprefixestprefix((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt%_split_c_string_for_namespace_matchessN          &    cC`s|j|dtS(uGiven a StudlyCaps string identifier like FooBar, return a list of (namespace, stripped_identifier) sorted by namespace length, or raise ValueError. As a special case, if the current namespace matches, it is always biggest (i.e. last).R(RR:(R$RH((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pytsplit_ctype_namespaces0scC`s|j|dtS(uGiven a C symbol like foo_bar_do_baz, return a list of (namespace, stripped_symbol) sorted by namespace match probablity, or raise ValueError.R(RR-(R$RQ((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pytsplit_csymbol_namespaces7scC`s|j|dt}|dS(uwGiven a C symbol like foo_bar_do_baz, return the most probable (namespace, stripped_symbol) match, or raise ValueError.Ri(RR-(R$RQR((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt split_csymbol=sc C`sV|jrtj|jdtjdtjdtjdt}|j|j\}}|jrtd|j|j|fn|j d}n|j d}|r|d}ny|j |}Wn%tk r}t t |nXx5|D]-\}} ||jkr|r!d| S| SqW|d \}} t d ||jfdS( NRRR{Ru&filter: "%s" exited: %d with error: %suasciiu_iiu2Skipping foreign identifier '%s' from namespace %s(R/RRRR:RRRRRRRRtstrR#R=R8( R$RHRt proc_identRthiddenRRRRmR=((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRNCs6       cC`s|j}|jd}|r+|d}ny|j|\}}Wn%tk rk}tt|nX||jkrtd|jfn|rd|S|S(Nu_iu)Skipping foreign symbol from namespace %s(RHRRRRRR#R=(R$RQRHRRmR=RR((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt _strip_symbolas  cC`s|dkr|j}n|tkr1|j|S|tkrJ|j|S|tkri|jtj |S|t kr|j |S|t kr|j ||S|tkr|jtj|S|tkr|j|S|tkrntd|fdS(Nu#transformer: unhandled symbol: '%s'(R8ttypeRt_create_functionRt_create_typedefRt_create_tag_ns_compoundRtRecordRt _create_enumRt_create_memberRtUnionRt _create_constRtprint(R$RQtstypet parent_symbol((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRIqs&              cC`sd}tt|jjdkr+dSd}xN|jjD]@}|dkr\|j}q>|||j}|dkr>dSq>W|S(NcS`sog}xYt|jd|jdD]6\}}||krQdj|dS|j|q(Wt||S(Nu_(tzipRjRwRCtmin(tatbt commonpartstawordtbword((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt common_prefixs . iu(RRUt base_typet child_listR8RH(R$RQRRtchild((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt_enum_common_prefixs    c C`s|j|}|r$t|}nd}g}xy|jjD]k}|jrRq=n|dkrn|j|}n|j|}|jtj |j |j |jdq=W|j |j}|jjrtj}n tj}|||jd|} | j|| S(Nitmembers(RRRRtprivateRHRRCRtMembertlowert const_intR8RNt is_bitfieldtBitfieldtEnumtadd_symbol_reference( R$RQRt prefixlenRRR=t enum_nametklassRD((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRs,      cC`s|jjdrdSt|j||j}|j|jj}|j|}tj |||t |j}|j ||S(Nu_( RHRR8RUt_create_parametersRt_create_returnRRtFunctionR-R(R$RQt parameterstreturn_R=tfunc((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRs cC`s|jtkrd}n|jtkr3|j}nh|jtkrN|j}nM|jtkrm|j|jS|jtkr|j|jd}nd}|S(Nuvoidu*ugpointer( RRR R=RRt_create_source_typeRR (R$t source_typetvalue((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRs   cC`s)|jt@}|jt@}|jtkr-dS|jttttt gkr|j }|scd}n|rvd|}n|r%d|}q%n|jt kr|j |j S|jtkr|j |j d}|r|d7}n|r%|d7}q%n,|rd}nd}|r!d|}n|S|S( Nuvoidugpointeruconst u volatile u*u constu volatileu gconstpointer(ttype_qualifierRRRRR RRR RR=Rt_create_complete_source_typeRR (R$RtconsttvolatileR((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRs>          cc`s8x1t|jD] \}}|j|||VqWdS(N(t enumerateRt_create_parameter(R$RQRtiR((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRsc C`s|j}|jd}|r+|d}n|j|}|d\}}|r]d|}ntjd||jf}|j|j||j|tjdd|j |j f} | S(Nu_iiu %s__%s__unionRpu%s.%s( RHRRRRt _parse_fieldsRRGtTypeR=( R$RQRt parent_identRRR2t parent_namet fake_uniont fake_type((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt_synthesize_union_types     c C`sU|j}|jtkrE|jjjtkrE|j|dt}n |jtkr{|jdkr{|j t j |}n|jt kr|jdkr|j t j |}n|jtkr|j|}|jjt kr |jjdkr |j||}t jd|d|}n|j|}|j|} | ddkr[| d } n| } |ddkr~|d } n|} |j|d|} t jd| d| d| }t|jj} t|_| r| dj|_qn|j|j}t j|j|dtdtd |j}|jrQt|_t|_ t|_n|S( Ntmembertcomplete_ctypeiu*tctypeitreadabletwritabletbits(!RRR Rt_create_callbackR:RR=R8t_create_member_compoundRRR RRRRtArrayRt_canonicalize_ctypetcreate_type_from_ctype_stringRURR-tzeroterminatedRtsizet_create_type_from_basetFieldRHRRR(R$RQRRRDRtsynthesized_typetftypeRtcanonical_ctypet derefed_nametderefed_complete_ctypet from_ctypeR((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRsP             cC`s|jj}|tkr?|jjjtkr?|j|}nX|tkr]|j|}n:|tkr|jjjtkr|jtj|dt }n|tkr|jtj|}n|t kr|jtj |}n|t kr|j |S|ttttfkrx|j|j}|j|j}|tjkrLdS|jdr_dStj||d|jStd|jt|f|S(Nt disguisedu_autoptrRusymbol '%s' of type %s(RRR Rt_create_typedef_callbackRt_create_typedef_compoundRRR:R RRRRR RRNRHRt type_namesR8RctAliastNotImplementedErrorR (R$RQRRDR=ttarget((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRUs6 ! !     cC`sYtjj|}|r|jS|jds2|S|d }|j|}|d}|S(Nu*i(RRR<ttarget_fundamentalRcR(R$Rt firstpasstbasetcanonical_baset canonical((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRts  c C`sb|j|}|j|}|jtko:|jjt@}|j|d|d|d|d|S(Ntis_constt is_parametert is_returnR(RRRR RRRR(R$RRRRRR((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRs c C`s|dkrT|dkr)d|d}n|}tj|tjd|d|d |S|dkrd|krd|jddd}nd|d}tj|tjd|d|d |S|dkrtjtjtjd|d|d |SdS(NuGListuGSListu GLib.Listu GLib.SListuGLib.iRRRuGArrayu GPtrArrayu GByteArrayu GLib.Arrayu GLib.PtrArrayuGLib.ByteArrayu GObject.ArrayuGObject.PtrArrayuGObject.ByteArrayu.u GHashTableuGLib.HashTableuGObject.HashTable(uGListuGSListu GLib.Listu GLib.SList(uGListuGSList( uGArrayu GPtrArrayu GByteArrayu GLib.Arrayu GLib.PtrArrayuGLib.ByteArrayu GObject.ArrayuGObject.PtrArrayuGObject.ByteArray(u GHashTableuGLib.HashTableuGObject.HashTable(RtListtTYPE_ANYRjRtMapR8(R$R RRRR=((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt_create_bare_container_types$       !c C`s|j|}|jdd}|r3|dks?|dkrytjj}d|_tjd|d|d|d|Stjj |} | dk rtj d| j d|d|d|S|j |d|d|d|} | r| Stj d|d|d|S( Nu*uuutf8*uGStrvRRRR ( RtreplaceRt TYPE_STRINGtcloneR8RRRR<RR R( R$RRRRRRR t bare_utf8t fundamentalt container((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRs"     cC`s|jtkr%tjdtjS|j|jdt}|jdkr|jrz|jjt krzt j |dnd|f}n |j}tj||SdS(Nu...Ru&missing parameter name; undocumentableuarg%d( RRRt ParametertVarargsRRR:RHR8RRRJ(R$RtindexRQtptypeRH((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRs cC`s"|j|dt}tj|S(NR(RR:RtReturn(R$Rttypeval((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRscC`sE|jjdrdS|jdks8|jjd r<dS|j|}|jdk rotj}|j}n|j dk r|j dk r|j |j }n tj }|}|j ||jr|jr|j|j}|j|}t|tjr|}qn|tjkr4t|j d }q|tjkrYt|j d }q|tjkr~t|j d }q|tjkrt|j d }qt|j }nd|jdk rtj}|jrdnd}n4|jdk rtj}d |jf}n ttj||||j}|j||S(Nu_u.hii@i iutrueufalseu%flIii( RHRR8tsource_filenameRcRt const_stringRRRRRtTYPE_INTt_resolve_type_from_ctypeRpRRotresolve_aliasesR>Rt TYPE_UINT64Rt TYPE_UINT32t TYPE_UINT16t TYPE_UINT8t const_booleant TYPE_BOOLEANt const_doublet TYPE_DOUBLEtAssertionErrorR?R(R$RQR=R"Rt unaliasedR R((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRsN"          cC`s|j|j}|jjr-|jj}nd}||jkr|j|}|jr|||jd|}|j|_|j||S||_|j|_n@|||jd|d|}|rt |_ n|j |||j||S(NRLR( RNRHRR=R8R1tfieldsRRR:RR(R$tcompound_classRQRR=RLtcompoundt new_compound((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRs&        cC`sj|j|jkr%|j|j}n|d|jd|j}t|_|j|||j||S(NRL(RHR1R8R-RRR(R$R3RQR4((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyR@s  cC`s6||j|j}|j|||j||S(N(RHRR(R$R3RQR4((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRPs cC`s|j|}|sdS|S(N(RR8(R$RQtcallback((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRVscC`sx|jjD]s}|j|d|}|s4q nt|tjrO|}n!tj|jdtt d|}|j j |q WdS(NRtanonymous_node( RRRIR>RRRHR8R:R-R2RC(R$RQR4Rt child_nodetfield((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyR\s  c C`sN|jjtkr*|j}|jj}n0|jjtkrZ|jj}|jjj}nt|j||}|j|}xJt|D]<\}}|jjdkr|j dkr|j |_ qqW|r|j } n<|j j ddkr |j |} n|j|j } tj| ||td|j } | j|| S(Nugpointeru user_datau_iR(RRRR RURRRR targnamet closure_nameRHtfindRRNRtCallbackR-R( R$RQRt paramtypet retvaltypeRtretvalRtparamR=R6((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRhs(  !   cC`std|kr?|j|}|r*|}qN|jj|}n|j|}|j||jrpd|_n|S(uParse a C type string (as might be given from an annotation) and resolve it. For compatibility, we can consume both GI type string (utf8, Foo.Bar) style, as well as C (char *, FooBar) style. Note that type resolution may not succeed.u.N(RR#ttype_from_nameRt resolve_typetresolvedR8R(R$ttypestrRR"((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pytcreate_type_from_user_strings     cC`sPxI|jjD]8}|j|}|rd|j|jf|_tSqWtS(Nu%s.%s(R+Rt get_by_ctypeR=RpR:R-(R$R"tpointer_strippedR2R ((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt'_resolve_type_from_ctype_all_namespacess cC`s|jjdd}y|j|}Wntk rH|j||SXx^|D]V\}}|j|}|s|j|}n|rPd|j|jf|_t SqPWt S(Nu*uu%s.%s( RRRRRIR<RGR=RpR:R-(R$R"RHRR2R=R ((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyR&s cC`s\xU|jD]G}|jj|jd}|dk r d|j|jf|_tSq WtS(Nu%s.%s( RRR<t gtype_nameR8R=RpR:R-(R$R"RmRD((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt_resolve_type_from_gtype_names  cC`st|tjtjfr+|j|jSt|tjrk|j|j}|j|j}|oj|S|j rxt S|j r|j |S|j r|j|SdS(N(R>RRRRCt element_typeRtkey_typet value_typeRDR:RR&RJRK(R$R"t key_resolvedtvalue_resolved((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyt_resolve_type_internals     cC`sx|j|stS|js%|jr)tSy|j|j}Wntk rXd}nX|dkrqd|_n|j S(N( RQR-R ttarget_foreignR:RoRptKeyErrorR8RD(R$R"ttype_((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyRCs    cC`sfx_t|tjra|jjdk r?|j|jj}q|jjdk r]|j}qPqW|S(uRemoves all aliases from typenode, returns first non-alias in the typenode alias chain. Returns typenode argument if it is not an alias.N(R>RRR RpR8RoR (R$ttypenode((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyR's N(<R R!tpropertyR2R-R6R7R9R;RGRTRWR^RiRoRrRvRZt classmethodR8RR[RRRRRRRNRRIRRRRRRRRRRRRRRRRRRRRRRRFRIR&RKRQRCR'(((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyR"1sv             /         )   8       0 8        (+t __future__RRRRR`RzRtRRRt cachestoreRt girparserRt sourcescannerR R R R R RRRRRRRRRRRRRRRRRt ExceptionRtobjectR"(((so/home/vagrant/ruby-gnome2/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/transformer.pyts