Xc@`sddlmZddlmZddlmZddlmZddlZddlmZddlmZdd l m Z m Z m Z m Z dd l mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'dd l m(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0dd l1m2Z2d e3fdYZ4dS(i(tabsolute_import(tdivision(tprint_function(tunicode_literalsNi(tast(tmessage(tTAG_DEPRECATEDt TAG_SINCEt TAG_STABILITYt TAG_RETURNS(tANN_ALLOW_NONEt ANN_ARRAYtANN_ATTRIBUTESt ANN_CLOSUREtANN_CONSTRUCTORt ANN_DESTROYtANN_ELEMENT_TYPEt ANN_FOREIGNtANN_GET_VALUE_FUNCtANN_INt ANN_INOUTt ANN_METHODtANN_OUTt ANN_REF_FUNCt ANN_RENAME_TOt ANN_SCOPEtANN_SET_VALUE_FUNCtANN_SKIPt ANN_TRANSFERtANN_TYPEtANN_UNREF_FUNCt ANN_VALUEt ANN_VFUNCt ANN_NULLABLEt ANN_OPTIONALtANN_NOT( tOPT_ARRAY_FIXED_SIZEtOPT_ARRAY_LENGTHtOPT_ARRAY_ZERO_TERMINATEDtOPT_OUT_CALLEE_ALLOCATEStOPT_OUT_CALLER_ALLOCATEStOPT_TRANSFER_CONTAINERtOPT_TRANSFER_FLOATINGtOPT_TRANSFER_NONEtOPT_NOT_NULLABLE(tto_underscores_noprefixtMainTransformercB`s$eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd:d:d:d Zd:d:d:dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"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-Z0d.Z1d/Z2d0Z3d1Z4d2Z5d3Z6d4Z7d5Z8d6Z9d7Z:d8Z;d9Z<RS(;cC`s+||_||_|j|_i|_dS(N(t _transformert_blockst namespacet _namespacet_uscore_type_names(tselft transformertblocks((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt__init__.s   cC`s|jjstjdn|jj|j|jj|j|jj|j|jj|j|jj|j |jj|jx|jj D]z}t |t j r|jdk r||j|js!c C`st|tjtjtjtjtjtjtjtj tj f r|j dk r[|j St|tj r|jdk r|jS|jStd|fdS(NuUnhandled node '%s'(RARRMRNRFRGtEnumtBitfieldRYtAliastConstantR{RDRBt gtype_nameR|tAssertionError(R4RS((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_get_annotation_names!cC`s|jj|j|S(N(R0RoR(R4RS((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt _get_blocksc C`s(|js tSt|tjr2|j||nt|tjrW|j||nt|tjr|j ||d|j |nt|tj tj tj tjtjtjfr|j||j |nt|tjtjfr|j||j |nt|tj tj tjtj fr|j |}x$|jD]}|j|||qQW|j|}d|jf}|jj|}|r|jr|j|_qnt|tj tj fr)x!|jD]}|j||qWx$|jD]}|j||q Wnt|tj r|j |}|r|jjt } | rr| dnd|_"|jjt#} | r| dnd|_$|jjt%} | r| dnd|_&|jjt'} | r| dnd|_(qnt|tj)r$|j*|nt+S(NRuu SECTION:%si(,R1RZRARRt_apply_annotations_aliasRKRzRYRyRRMRNRGRRR}t_apply_annotations_enum_membersRFRVt_apply_annotations_fieldRRIR0Rot descriptiontdoct propertiest_apply_annotations_propertytsignalst_apply_annotations_signalRnRRDt unref_funcRtref_funcRtset_value_funcRtget_value_funcRt_apply_annotations_constantR\( R4RSR]RuR^RHt section_nametproptsigt annotation((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR?sR "'cC`sst|kr"|j|||n"t|krD|j|||nt|jtjro|j|j|ndS(N( R t_apply_annotations_arrayRt_apply_annotations_element_typeRAttypeRtArrayt_check_array_element_type(R4ReRSRn((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_adjust_container_types   c `sfdfd}fdfd}||\}}|rwtjdfn|jsd} |dk rt|tjr|j} j||} n} tj |d| fd| n|S(Nc `stjd|d}t|dkr:|dddgn|\}}}||g}|dksp|dkr|dkrdnd} xZ|| kr||||\} }|j| |d|d}}qWn ||}|||fS( uReturn a complete type, and the trailing string part after it. Use resolver() on each identifier, and combiner() on the parts of each complete type. (top_combiner is used on the top-most type.)u ([,<>()])iiuuu)(tretsplittlentappend( ttype_strtresolvert top_combinertcombinertbitstfirsttseptresttargstlastseptnext(tgrab_one(sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs4  c`sjj|}|S(N(R/tcreate_type_from_user_string(tidenttres(R4(sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRsc`s|s |St|tjrAt|dkrAtj|j|St|tjrvt|dkrv|d|_|St|tjrt|dkrtj|Stj df|S(Niiiu.Too many parameters in type specification '%s'( RARtListRRHRt element_typetMapRtwarn(tbaseR(R(sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR#s$$ $ c`s:dk r-ttjr-j|_n||S(N(RDRARtTypetis_const(RR(Rt type_node(sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR1su.Trailing components in type specification '%s'u%s: Unknown type: '%s't positions( RRtresolvedRDRARRKRst _get_positionRq( R4RRRSReRRtresultRtpositionttext((RRR4RRsy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_resolve s"    cC`s@|j|d|d|d|}|dk r<|j|_n|S(uJLike _resolve(), but attempt to preserve more attributes of original type.RRSReN(RRDR{(R4RRRSReR((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_resolve_toplevelFs! cC`s|jj|j}|rt|tjrE|jj|j}n-t|tjrl|j jt }nd}|j r|j Sn|j S(N( R0RoRsRARRatparamsRbtReturnttagsR RDR(R4tfuncRhRutpart((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyROs  cC`s|j}|j}|tjjkrv|tjkrB|tjks]t|tjtj frvt j d|j qvn|tjj kr|tjkrtj|_q|tjtjtjgkrt j d|j qndS(Nu9invalid (element-type) for a GPtrArray, must be a pointeruNinvalid (element-type) for a GByteArray, must be one of guint8, gint8 or gchar(t array_typeRRRt GLIB_PTRARRAYtBASIC_GIR_TYPESt POINTER_TYPESRARRRRRtGLIB_BYTEARRAYtTYPE_ANYt TYPE_UINT8t TYPE_INT8t TYPE_CHAR(R4tarrayRnRR((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR^s    c C`s\|jt}|r7|j|d|j||}ngt|jtjr[|jj}nC|jj}|j dk r|j j dr|j d |_ nt|jtjr|jj }nd}|jt }tj||d|jj d|jj}|jtddkr%t|_n6t|ksF|jtdkrRt|_n t|_|jt} | r t|tjr|j|| |} nZ|j|| |} | r|j| } |j| _| jtjkrtj| _qn| r | |_q n|jt} | rOyt| |_WqOt t!fk rKdSXn||_dS(Niu*iR{Ru0u1("RoRRRRARRRtcloneR{RDtendswithRR RR&RZtzeroterminatedR\R%tCompoundRmRjR_t directiontPARAM_DIRECTION_OUTtPARAM_TRANSFER_FULLRtlength_param_nameR$tinttsizet TypeErrorR`( R4ReRSRntelement_type_optionstelement_type_nodeRt array_optionstcontainer_typetlengtht paramnameRhtfixed((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRtsP !     cC`s|jt}|dkrdSt|jtjrt|dkrjtj dt|f|j dS|j |d|j|||j_ n(t|jtj r*t|dkrtj dt|f|j dS|j |d|j|||j_|j |d|j|||j_nt|jtjrt|dkrutj dt|f|j dS|j |d|j|||j_ ntj d|jf|j dS(NiuQ"element-type" annotation for a list must have exactly one option, not %d optionsiiuZ"element-type" annotation for a hash table must have exactly two options, not %d option(s)uS"element-type" annotation for an array must have exactly one option, not %d optionsu0Unknown container %r for element-type annotation(RoRRDRARRRRRRRRRRtkey_typet value_typeR(R4ReRSRnR((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRsF            cC`s9|jtjtjgkr2|jr+tjStjStjS(N(RRtPARAM_DIRECTION_INOUTRtcaller_allocatestPARAM_TRANSFER_NONER(R4ReRS((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_get_transfer_default_params   cC`sg|jtjs6|js6|jtjtjfr=tjS|jtjrVtjS|j rcdSdS(N( tis_equivRRRRt TYPE_NONERt TYPE_STRINGRttarget_fundamentalRD(R4ttypeval((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt&_get_transfer_default_returntype_basics  cC`sf|jj|}|jj|}||kr4tS|jrb|jjdkrb|j|j|StS(NuGObject.Object(R/tlookup_typenodeR\t parent_typet target_ginamet_is_gi_subclassRZ(R4Rt supercls_typetclstsupercls((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs c C`s|j}|j|}|r"|S|js/dS|jj|}t|tjrc|j|j St|tj st|tj tj fr|j dk s|jrtjSt|tjtjfrtjSt|tjr|jrt|tjrvtjdd}y|jj|}Wn$tk rL}tj|ddSX|rl|j||rltjStjSqt|tj tj frtjStdn)t|tjtj tj frdSdSdS(NRuGObject.InitiallyUnownedu0constructor found but GObject is not in includesuInvalid constructor(RRRRDR/RRARRRwtBoxedRFRGRtforeignRRRRRKtis_constructorRMRtKeyErrorRt error_nodeRR( R4ReRSRtbasicRwtinitially_unowned_typetinitially_unownedte((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_get_transfer_default_returns@   !cC`s|jjtjs*t|jtjr1tjSt|tjrS|j||St|tj ru|j ||St|tj rtjSt|tj rtjSt |dS(N(RRRRRAtVarargsRRaRRRtFieldtPropertyR(R4ReRS((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs*cC`st|tj r2|jtjtjfkr2tS|jj|j }|jj |}|dkrn|j n|}t|tj  p|tj kp|jjdS(Nu*(RARRRRRR\R/RRtresolve_aliasesRDRt BASIC_TYPESR{R(R4RSRnRw((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_is_pointer_type&s c C`s|jt}| s(t|dkr,dS|d}|jj|j}|jj|}|dkrr|jn|}t|t j r|n|j}|t krt }t|t j t jf r|jdkrtjdj||jdSn|tkrVt|krt|t jt jt jf rtjdj||jdSn|j|| r|t jt jfkrt|t jt jt jt jt jt jt j t jf rtjdj||jdS||_dS(Niiu GLib.VariantuOinvalid "transfer" annotation for {0}: only valid for object and GVariant typesuEinvalid "transfer" annotation for {0}: only valid for container typesuminvalid "transfer" annotation for {0}: only valid for array, struct, union, boxed, object and interface types( RoRRR/RRRRDRARRR*R+RMRNRRRtformatRR)R RRRR Rt TYPE_FILENAMERFRRR(R4ReRSRnttransfer_annotationRRwt node_type((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_apply_transfer_annotation4sB !     "    cC`s |r|jni}|jt}|rO|j|d|j|||_nt}d}t|krstj }nt |krctj }|t }t |dkr,|jj r#|jjr#|jj|jj } |jj| } d|jjk} t| tjtjf} | o| }q`t}q{|d} | tkrKt}q{| tkr{t}q{nt|kr{tj}n|dk r||jkr||_||_|j|||_n|j||||j||||jj tj!rt|_"nt#|krP|j$||r:t|_"t|_%qPt&j'd|j(nt)|krt|tj* r|jtj krt|_+qt&j'd|j(nt,|kr|jtj krt|tj* rt|_+q|j$||rt|_"qt&j'd|j(n|jtj krV|jj dksJ|jj dkrVt|_"nt-|krwt|_"t|_%n|r|j.r|j.|_/nt0|krt|_1n|r|jt2} | dk rx3| j3D]"\}}|r||j4|Jsu5%s: unknown parameter '%s' in documentation comment%s(tsettinstance_parameterRRoRbRDR6taddRtjointsortedRRRHR( R4ReRRut declparamst doc_paramRht docparamstunknowntunusedtdoc_nameR((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_apply_annotations_params)s<        # cC`s@|j|||j||j||j||j|dS(N(R}RFRR8R(R4RSR]Ru((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRyQscC`s|s dS|jj|j}|s)dS|jjt}|r]|jj|d|_n|j|_ y|j |||jWnt k r}t |nXdS(Ni( RRoRHRnRR/RRRRRtAttributeErrortprint(R4ReRuR^RRtex((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRVs cC`s|j|}|jjd||jf}|j|||sHdS|jjt}|dk r|d}|tkrt }n||_ n|j |||_ |jjt }|r|j |d|j|||_ndS(Nu%s:%si(RR0RoRHR}RnRRDR*R+RRRRR(R4ReRtprefixRuR RR((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRes     c C`sg}|j|}|jjd||jf}|r|j||t|jt|jkr|jj}xbt |jD]#\}}||d\|_ }qWqt|jdkrt j d|j qnxt |jD]\}}|r^||d\} }|rd|jjt} | r[|j| d|j|||_q[qdnd}|j|||qW|j||j|dS(Nu%s::%siiuWincorrect number of parameters in comment block, parameter annotations will be ignored.(RR0RoRHR}RRRRt enumerateRbRRRRnRRRRDR6R8R( R4RetsignalR8RJRutiRhRRHR((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRws. cC`s[|j|}|dkrdS|j|||jjt}|rW|d|_ndS(Ni(RRDR}RnRoRR!(R4RSRutvalue_annotation((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs cC`s^|dkrdSxG|jD]<}|jj|jd}|r|jr|j|_qqWdS(N(RDtmembersRRoRsRR(R4RSRutmRh((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs  c C`st|tjr|jj|j}|j||||rJ|dnd}|r|r|jjt }|r|d}t }xL|j D]A}|j |krt }|j |_|j||g|PqqW|stj|d|t fqqqnt S(Niiu/Virtual slot '%s' not found for '%s' annotation(RARRKR0RoRsRxRDRnR RZtvirtual_methodsRHR\tinvokerRyRRq( R4RSR]RuRetvirtual_annotationt invoker_nametmatchedtvfunc((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRPs(    cC`sIt|}x6|D].}|jj|}|s|j|qqW|S(uhGiven a list of Type instances, return a new list of types with the ones that failed to resolve removed.(RJR/t resolve_typetremove(R4ttypelistt new_typelistRR((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_resolve_and_filter_type_lists   c C`set|tjr(|jj|jnt|tjrzx$|jD]}|jj|jqDW|jj|j jnt|tj r|jj|j nt|tj tj tjtjfrx3|jD]%}|jrq|jj|jqWnt|tj tj fr x|jD]V}y|jj|Wntk rTq$nX|jj|}|r$||_Pq$q$Wt|tj rtjdd|_nx$|jD]}|jj|jqWx;|jD]-}x$|jD]} |jj| jqWqWnt|tj r7|j|j|_nt|tj ra|j|j|_ntS(NRuGObject.Object(RARRR/RWRwR~RRRRRRMRNRFRGRVRXt parent_chainR`RRRRRR[t interfacest prerequisitesR\( R4RSR]t parameterR^ReRwRRRh((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR<sF'   cC`s`i}x[|jjD]J}t|tjs4qnt|jj}|||<|||j|j|_qttj|d|j fqtWdS(Nu_quarku g_io_erroru IOErrorEnumu+%s: Couldn't find corresponding enumeration(R2R@RARRR-RHRItErrorQuarkFunctionRsRR/t split_csymbolRoR3RDt error_domainRRq(R4t uscore_enumstenumRTRStfulltnstshort((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRRs,     cC`sd}d}d}xtr|jd|}t||krCdSt|}|d}|jj|}|r|dj|dfS|d7}qWdS(u1'uscored' should be an un-prefixed uscore string. This function searches through the namespace for the longest type which prefixes uscored, and returns (type, suffix). Example, assuming namespace Gtk, type is TextBuffer: _split_uscored_by_type(text_buffer_try_new) -> (ast.Class(TextBuffer), 'try_new')iiu_iN(RDR\trsplitRR3RoR>(R4RTRStcounttprev_split_countt componentst type_string((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_split_uscored_by_types   cC`s|jjds|jr"dS|jj|j\}}|j||rc|j||dS|j||r|j||dS|j ||rdSdS(uXCheck to see whether a toplevel function should be a method or constructor of some type.u_N( RsRWtis_type_meta_functionR/Rat_is_constructort_set_up_constructort _is_methodt _setup_methodt_pair_static_method(R4RRft subsymbol((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRL0scC`s|j}t|jS(u;Given a Type(target_giname='Foo.BarBaz'), return 'bar_baz'.(t get_ginameR-RI(R4RRH((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_uscored_identifier_for_typeCs cC`s|js3|jr/tj|d|jfntS|jd}|jj|j}t |t j t j t j t jt jfs|jrtj|d|jfntS|j|jkr|jrtj|d|jfntS|jt jkr$|jr tj|d|jfntS|jjdk rU|jjjddkrUtS|js|j||}|j|stSntS(Nu %s: Methods must have parametersiu8%s: Methods must have a pointer as their first parameteruI%s: Methods must belong to the same namespace as the class they belong tou;%s: The first argument of methods cannot be an out-argumentu*i(RR)RRqRsRZR/RRRARRMRNRFRGRR1R2RRR{RDRit_get_uscored_prefixRWR\(R4RRtRRwtuscored_prefix((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRqHsD           - cC`sC|j||}|jj|jdj}|j r|j|d r|j}|j|_ |jj d|_ |j j |}|j |t|d|_t|_|jj|nz|jj d|_ |jj||js/|j j |}|j |t|d|_t|_n|jj|dS(Niu_i(RwR/RRRR)RWRRHtmoved_totpopR<RstfindRR\tmethodsRR2tfloat(R4RRtRxRwtnewfunct subsym_idx((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRrqs"     cC`st}d}|jd}|jj|j}t|drs|jdk rs|j|j}|rs|j}qsn|s|j |j}n|S(Niuc_symbol_prefix( RZRDRR/RRthasattrRERWRv(R4RRttprefix_matchesRxt first_argRw((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRws cC`s|j|}|dkrtS|\}}|dkr;tSt|tjrz|jj|||_|j j |t St|tj tj tjtjtjtjfr|j}||_|j j ||jd|j|_t StS(Nuu.(RmRDRZRARRMR2R}RHtstatic_methodsRR\RNRFRGRRRRRy(R4RRtRRStfuncnametnew_func((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRss&      cC`s~|jj||j|||_|j||}|jj|t|_|j j sz|j ||j |j _ ndS(N( R2R}t_get_constructor_nameRHt_get_constructor_classt constructorsRR\RRRR(R4RRtt origin_node((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRps   cC`sXd}|j|}|dkrH|jrT|jj|jj}qTn |\}}|S(N(RDRmRR/RRR(R4RRtRRt_((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs   cC`sId}|j|}|dkr9|jrE|j}qEn |\}}|S(N(RDRmRRH(R4RRtRHRR((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs   cC`s:|jdrtSd|kr#tS|jdr6tStS(Nu_newu_new_u_newv(RR\RZ(R4Rs((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_guess_constructor_by_names cC`s|js"|j|js"tSn|jj|jj}t|t j pt|t j t j t j fo|jdk p|js|jrtj|d|jfntS|j||}|dkr|jrtj|d|jfntSt|t j p?t|t j t j t j fo?|jdk p?|jsFtS|j|jkr|jr~tj|d|jfntS|j rt|jdkr|jj|jdj}|dk r|j|jkrtSnt|t j r|}x|r|jdk r||kr#Pn|jrD|jj|j}nd}|dkrtj|d|jt|jt|jjftSqWnH||krtj|d|jt|jt|jjftStS(Nu7%s: Constructors must return an instance of their classu5Can't find matching type for constructor; symbol='%s'uN%s: Constructors must belong to the same namespace as the class they belong toiuGObject.ObjectuXReturn value is not superclass for constructor; symbol='%s' constructed='%s' return='%s'uIConstructor return type mismatch symbol='%s' constructed='%s' return='%s'(RRRsRZR/RRRRARRMRFRGRRCRDRRRqRR1R2RRtgi_nameRtstrt create_typeR\(R4RRtRwRRRe((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRosp !    !         cC`s|js dS|j}|jj|j}x/|jD]$}t|tjr8t|_ q8q8Wx@|jD]5}d}t|j tj r|j }nB|j dk rj|jj|j }t|tj sqjqnqjt|jdkrqjn|jdj }||krqjntjj|j|}|jd|_|j||j|}|jjd||jf} |j||g| |jj|qjWx|jD]}x|jD]} | j|jkrqn| jj |jj krqnt| jt|jkrqnxOtt| jD]8} | j| j } |j| j } | | kr3q3q3q3W| j|_|jj| j} |j|g| PqWqWdS(u2Look for virtual methods from the class structure.Niu%s::%s( tglib_type_structRR/RRVRARRRZtwritableRDRXRYRRRR-t from_callbackRHR<tinherit_file_positionsRR0RoRyRQRR|RtrangeRRRs(R4RSRt class_structR^tcallbacktfirstparam_typeRVRJRutmethodRMtm_typetv_type((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyROAsZ         cC`s3t|tjr/|j||j|ntS(uKPass 3 is after we've loaded GType data and performed type closure.(RARR~t_pass3_callable_callbackst_pass3_callable_throwsR\(R4RSR]((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRQs c C`s|j}xe|D]]}|jj|j}t|tjr|jjdkrmtj|_ tj |_ qmqqWd}x|D]}|jj|j}t }t|tjr|jjdkrt}q|}q~n|dkrq~n|r|j|_tj|_ tj |_ q~|jjtjr~|jdk r~|jjdr~|j|_q~q~WxQ|D]I}|jdk rg|j|j}||}|jst|_qqgqgWdS(uaCheck to see if we have anything that looks like a callback+user_data+GDestroyNotify set.uGio.AsyncReadyCallbackuGLib.DestroyNotifyudataN(uGio.AsyncReadyCallbackuGLib.DestroyNotify(RR/RRRARRYRtPARAM_SCOPE_ASYNCR.RRRDRZR\RbR/R0RRRR1tget_parameter_indexRR( R4RSRRhtargnodetcallback_paramtis_destroynotifytidxt closure_param((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRsB             cC`sI|js dS|jd}|jjdkrE|jjt|_ndS(uaCheck to see if we have anything that looks like a callback+user_data+GDestroyNotify set.NiuGError**(RRR{RzR\tthrows(R4RSt last_param((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs    N(=t__name__t __module__R7RUR;RjRmRxRzR=R>RRR?RRDRRRRRRRRRRRR RR"R}RR6R8RFRyRRRRRRPR[R<RRRmRLRvRqRrRwRsRpRRRRoRORQRR(((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR.,st  8      + 9   6 '  '   + f .  % (    #  ' !    ) "  #  F C  -(5t __future__RRRRRtRRtannotationparserRRRR R R R R RRRRRRRRRRRRRRRRRRR R!R"R#R$R%R&R'R(R)R*R+R,tutilsR-tobjectR.(((sy/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyts "@