iQc@stddlZddlmZddlmZddlmZmZmZmZm Z m Z m Z m Z m Z mZmZmZmZmZddlmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*ddlm+Z+ddl,m-Z-dd l.m/Z/m0Z0d e1fd YZ2dS( iNi(tast(tmessage(t TAG_VFUNCt TAG_SINCEtTAG_DEPRECATEDt TAG_RETURNStTAG_ATTRIBUTESt TAG_RENAME_TOtTAG_TYPEtTAG_UNREF_FUNCt TAG_REF_FUNCtTAG_SET_VALUE_FUNCtTAG_GET_VALUE_FUNCt TAG_VALUEt TAG_TRANSFERt TAG_STABILITY(tOPT_ALLOW_NONEt OPT_ARRAYt OPT_ATTRIBUTEtOPT_ELEMENT_TYPEtOPT_INt OPT_INOUTt OPT_INOUT_ALTtOPT_OUTt OPT_SCOPEtOPT_OUT_CALLER_ALLOCATEStOPT_OUT_CALLEE_ALLOCATEStOPT_TYPEt OPT_CLOSUREt OPT_DESTROYt OPT_TRANSFERtOPT_SKIPt OPT_FOREIGNtOPT_ARRAY_FIXED_SIZEtOPT_ARRAY_LENGTHtOPT_ARRAY_ZERO_TERMINATEDtOPT_CONSTRUCTORt OPT_METHODtOPT_TRANSFER_NONEtOPT_TRANSFER_FLOATING(tAnnotationParser(tTransformerException(tto_underscorestto_underscores_noprefixtMainTransformercBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d9d9d9d Zd9d9d9d ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ 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;RS(:cCs+||_||_|j|_i|_dS(N(t _transformert_blockst namespacet _namespacet_uscore_type_names(tselft transformertblocks((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt__init__,s   cCst|jj}t|dkr7tjdn|jj|j|jj|j|jj|j |jj|j |jj|j |jj|jx|jjD]z}t |t jr|jdk r||j|js!c Cst|tjtjtjtjtjtjtjtj tj f r|j dk r[|j St|tj r|jdk r|jS|jStd|fdS(NsUnhandled node %r(R@RRKRLRERFtEnumtBitfieldRZtAliastConstantRyRCRAt gtype_nameRztAssertionError(R2RR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_get_annotation_names!cCs|jj|j|S(N(R.RvR(R2RR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt _get_blocksc Cs|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|j}|jj|}|r|jr|jnd|_qnt|tj tj fr,x!|jD]}|j||qWx$|jD]}|j||qWnt|tj r|j |}|r|jt } | rq| j!nd|_#|jt$} | r| j!nd|_%|jt&} | r| j!nd|_'|jt(} | r| j!nd|_)qnt|tj*r|j+|nt,S(NRrsSECTION:t(-R/R[R@RRt_apply_annotations_aliasRIRxRZRwRRKRLRFRRR{t_apply_annotations_enum_membersRERWt_apply_annotations_fieldRRHR.Rvtcommenttdoct propertiest_apply_annotations_propertytsignalst_apply_annotations_signalRkR RlRCt unref_funcR tref_funcR tset_value_funcR tget_value_funcRt_apply_annotations_constantRV( R2RRR]RrR^RGt section_nametproptsigttag((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR?sR "'!cCst|k}t|k}|r4|j|||n|rP|j|||nt|jtjr{|j|j|ndS(N( RRt_apply_annotations_arrayt_apply_annotations_element_typeR@ttypeRtArrayt_check_array_element_type(R2ReRRtoptionsthas_element_typet has_array((s/home/kou/work/ruby/ruby-gnome2.win32/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( sReturn 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.)s ([,<>()])iiRtt)(tretsplitR8tappend( ttype_strtresolvert top_combinertcombinertbitstfirsttseptresttargstlastseptnext(tgrab_one(s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs4  csjj|}|S(N(R-tcreate_type_from_user_string(tidenttres(R2(s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRscs|s |St|tjrAt|dkrAtj|j|St|tjrrt|dkrrtj|Stjdf|S(Niis,Too many parameters in type specification %r(R@RtListR8RGtMapRtwarn(tbaseR(R(s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs$$ cs:dk r-ttjr-j|_n||S(N(RCR@RtTypetis_const(RR(Rt type_node(s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR#ss,Trailing components in type specification %rs%s: Unknown type: %rt positions( RRtresolvedRCR@RRIRpt _get_positionRn( R2RRRRReRRtresultRtpositionttext((RRR2RRs/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_resolves"     cCs@|j|d|d|d|}|dk r<|j|_n|S(sJLike _resolve(), but attempt to preserve more attributes of original type.RRRReN(RRCRy(R2RRRRReR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_resolve_toplevel8s! cCs|jj|j}|rt|tjrE|jj|j}n-t|tjrl|j jt }nd}|j r|j Sn|j S(N( R.RvRpR@RRatparamsRbtReturnttagsRRCR(R2tfuncRhRrR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRAs  cCs|jtjjkry|jtjkr9|jtjksct|jtjsct|jtj ryt j d|j n|jtjj kr|jtjkrtj|_q|jtjtjtjgkrt j d|j qndS(Ns9invalid (element-type) for a GPtrArray, must be a pointersNinvalid (element-type) for a GByteArray, must be one of guint8, gint8 or gchar(t array_typeRRt GLIB_PTRARRAYt element_typetBASIC_GIR_TYPESt POINTER_TYPESR@RRRRRtGLIB_BYTEARRAYtTYPE_ANYt TYPE_UINT8t TYPE_INT8t TYPE_CHAR(R2tarrayR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRPs    cCs%|jt}|r$|j}ni}|jt}|dk ri|j|j|j||}ngt|jt j r|jj }nC|jj }|j dk r|j jdr|j d |_ nt|jt j r|jj}nd}t j ||d|jj d|jj} t|krK|jtdk| _n t| _|jt} | dk r|j|| |} | r|j| } |j| _| jt jkrt j| _n| j| _qn|jt} | ryt| | _Wqt k rdSXn| |_dS(Nt*iRyRt1(!RvRtallRRCRtoneRR@RRRtcloneRytendswithRRR#tzeroterminatedR[R"RjR_t directiontPARAM_DIRECTION_OUTtPARAM_TRANSFER_FULLRRbtlength_param_nameR!tinttsizeR`(R2ReRRRt array_optt array_valuesRtelement_type_nodeRtcontainer_typetlengtht paramnameRhtfixed((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRgsP       cCs|jt}|dkr2tjd|jdSt|jtj r|j dkr}tjd|j f|jdS|j |j |j|||j_ n3t|jtjrK|j dkrtjd|j f|jdS|j}|j |d|j|||j_|j |d|j|||j_nt|jtjr|j dkrtjd|j f|jdS|j |j |j|||j_ ntj|d|jfdS( Ns=element-type annotation takes at least one option, none givenisOelement-type annotation for a list must have exactly one option, not %d optionsisXelement-type annotation for a hash table must have exactly two options, not %d option(s)isQelement-type annotation for an array must have exactly one option, not %d optionss0Unknown container %r for element-type annotation(RvRRCRRRR@RRRRRRRRtflattkey_typet value_typeRRn(R2ReRRRtelement_type_optR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRsL            cCs9|jtjtjgkr2|jr+tjStjStjS(N(RRtPARAM_DIRECTION_INOUTRtcaller_allocatestPARAM_TRANSFER_NONER(R2ReRR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_get_transfer_default_params   cCs^|jtjs-|js-|jtjr4tjS|jtjrMtjS|jrZdSdS(N( tis_equivRRRt TYPE_NONERt TYPE_STRINGRttarget_fundamentalRC(R2ttypeval((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt&_get_transfer_default_returntype_basics  cCs|jj|}|s*tt||jj|}|sHt||krXtS|jr|jjdkr|j|j|StS(NsGObject.Object( R-tlookup_typenodeRtstrRVt parent_typet target_ginamet_is_gi_subclassR[(R2Rt supercls_typetclstsupercls((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs  c Cs|j}|j|}|r"|S|js/dS|jj|}t|tjrc|j|j St|tj st|tj tj fr|j dk s|jrtjSt|tjtjfrtjSt|tjr||jr|t|tjrKtjdd}|jj|}|rA|j||rAtjStjSqt|tj tj frmtjStdn)t|tjtj tj frdSdSdS(NRsGObject.InitiallyUnownedsInvalid constructor(RRRRCR-RR@RRRttBoxedRERFRtforeignRRRRRItis_constructorRKRRR(R2ReRRRtbasicRttinitially_unowned_typetinitially_unowned((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_get_transfer_default_returns8   !cCs|jjtjs*t|jtjr1tjSt|tjrS|j||St|tj ru|j ||St|tj rtjSt|tj rtjSt |dS(N(RRRRR@tVarargsRRaRRR tFieldtPropertyR(R2ReRR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR s*c Cst|di}|jt}|rN|j|j|j|||_nt}d}t|ksrt |kr~t j }nt |kry|t }|dk r|j}nt j }|dkrL|jjrC|jjrC|jj|jj} |jj| } d|jjk} t| t jt jf} | o=| }qvt}q|tkrat}q|tkrt}qnt|krt j}n|dk r||jkr||_||_|j|||_n|jt} | r*| j dkr*| j} | t!krt"} n| |_n|j#|||t$|ksm|jjdksm|jjdkryt|_%n|dk r|j&dk r|j&|_'nt(|krt|_)n|rx0|j*t+D]}|j,j-|j.qWndS(NRRs**isGio.AsyncReadyCallbacksGio.Cancellable(NR(/tgetattrRvRRRRR[RCRRRRRRRRyR-t lookup_ginametresolve_aliasesR@RERFRRVRRtPARAM_DIRECTION_INRRRRRRR'R&RRt allow_noneRRRtskiptgetallRt attributesRR(R2ReRRRRt param_typeRtannotated_directiontsubtypeRtthas_double_indirectiontis_structure_or_uniont transfer_tagRt attribute((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt#_apply_annotations_param_ret_commonsf                         c Cs#|dkrdS|jr"|jnd|_|jt}|dk rU|j|_n|jt}|dk r|j}d|kr|jd}|| }||d}n |}d}||_ |dk r||_ qn|jt } | dk r>| jj } | d kr!| |_ q>tjd| j| jn|jt} | dk rxE| jjD]1\} }|ri|jj| |jfqiqiWnt|jkrt|_nt|jkrt|_nt|jkrt|tjrt|_ nt!|jkrt|_"ndS( NRs: itStabletUnstabletPrivatetInternals$unknown value "%s" for Stability tag(RRR R!(#RCRRRkRRltversionRtfindt deprecatedtdeprecated_versionRt capitalizet stabilityRRRRRtitemsRRRRRVRR RR$R@RRIRR%t is_method( R2RRRrt since_tagtdeprecated_tagRltcolonR"tdesct stability_tagR't annos_tagtkey((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR{WsL             &  ! cCs#|j|}|j||dS(N(RR{(R2RRR]Rr((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRsc Cs||r|j}ni}t|tjtjfr5|jt}|rx|jdkrx|j|_ tj |_ n|jt }|r|j ||j||_|jdk rtj|_ |j|j}tj|_ qn|jt}|re|jdkre|j ||j||_qen0t|tjret|kre|j|_qen|j|||dS(Ni(RR@RRIt VFunctionRvRRRtscopeRRRRjt destroy_nameRCtPARAM_SCOPE_NOTIFIEDR_Rt closure_nameRZRbR( R2ReRhRRR2tdestroyt destroy_paramtclosure((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_apply_annotations_params4        cCs5|r|jt}nd}|j|||dS(N(RkRRCR(R2Retreturn_RrR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_apply_annotations_returnsc Cs{tg}|jr+|j|jjnxR|D]J}|rS|j|j}nd}|j||||j|jq2W|sdSt|j}||}||} x|D]} | jddt gkrqnt | dkrd} nKt | dkr!| \}d|f} n ddj d | Df} |j| }t j d |j| | f|jqWdS( Ns...tvarargsiRis, should be %rs, should be one of %ss, css|]}t|VqdS(N(trepr(t.0tp((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pys ss3%s: unknown parameter %r in documentation comment%s(tsettinstance_parametertaddRbt get_paramRCR9RRHRR8tjoinRRRGR( R2ReRRrt declparamsRhRt docparamstunknowntunusedtdoc_nameR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_apply_annotations_paramss:        cCs@|j|||j||j||j||j|dS(N(R{RJR~R;R(R2RRR]Rr((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRwscCs~|dkrdSxg|jjD]V}|tkr8q nx;|D]}|j|kr?Pq?q?Wtjd|j|fq WdS(Ns3Annotation for '%s' refers to unknown argument '%s'(RCRtkeysRRbRRRG(R2ReRRrRRh((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_check_arg_annotationss   cCs|s dS|j|j}|s&dS|jjt}|r\|jj|j|_ny|j |||jWnt k rnXdS(N( RCRGRRvRR-RRRRtAttributeError(R2ReRrR^Rtt((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs cCs|j|}|jjd||jf}|j|||sHdS|jt}|dk r|j}|t krt }n||_ n|j |||_ |jt }|r|j|j|j|||_ndS(Ns%s:%s(RR.RvRGR{RkRRCRlR'R&RRRRR(R2ReRtprefixRrRRttype_tag((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs     c Cso|j|}|jjd||jf}|j|||rt|jt|jkr|jj}x=t |jD]#\}}||d\|_ }qWng}xt |jD]\}}|r8||d\} }t |di} | jt } | r>|j | j|j|||_q>nd}|j|||qW|j||j|dS(Ns%s::%siR(RR.RvRGR{R8RR~R(t enumerateRbRRRRRRCR9R;R( R2RetsignalRORrtnamestiRhRRGRR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs&$cCsW|j|}|dkrdS|j|||jt}|rS|j|_ndS(N(RRCR{RkR Rl(R2RRRrR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR1s cCs[|dkrdSxD|jD]9}|jj|jd}|dk r|j|_qqWdS(N(RCtmembersRRvRpRR(R2RRRrtmR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR<s   cCs)t|tjr%|j||ntS(N(R@RRIt_apply_annotations2_functionRV(R2RRR]((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRNEsc Cs|jj|j}|j||||r8|dnd}|oG|sNdS|jt}|sgdS|j}t}xL|j D]A}|j |krt }|j |_ |j ||g|PqqW|stj|d|tfndS(Nis+Virtual slot %r not found for %r annotation(R.RvRpRuRCRkRRlR[tvirtual_methodsRGRVtinvokerRwRRn( R2RRR]RrRetvirtualt invoker_nametmatchedtvfunc((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRWJs&    cCsIt|}x6|D].}|jj|}|s|j|qqW|S(shGiven a list of Type instances, return a new list of types with the ones that failed to resolve removed.(R6R-t resolve_typetremove(R2ttypelistt new_typelistRR((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_resolve_and_filter_type_listcs   c Cset|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(NRsGObject.Object(R@RRR-R^RtR|R~RRRRRKRLRERFRWRYt parent_chainR`RRRRRRbt interfacest prerequisitesRV( R2RRR]t parameterR^ReRtRRRh((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR<nsF'   cCsxi}x[|jjD]J}t|tjs4qnt|jj}|||<|||j (ast.Class(TextBuffer), 'try_new')iiRUiN(RCRVtrsplitR8R1RvRD(R2RSRRtcounttprev_split_countt componentst type_string((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_split_uscored_by_types   cCs|jjds|jr"dS|jj|j\}}||jksRt|j||rx|j||dS|j ||r|j ||dS|j ||rdSdS(sXCheck to see whether a toplevel function should be a method or constructor of some type.RUN( RpRXtis_type_meta_functionR-RlR0Rt_is_constructort_set_up_constructort _is_methodt _setup_methodt_pair_static_method(R2RRqt subsymbol((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRJscCs|j}t|jS(s;Given a Type(target_giname='Foo.BarBaz'), return 'bar_baz'.(t get_ginameR+RH(R2RRG((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_uscored_identifier_for_types cCs|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(Ns %s: Methods must have parametersis8%s: Methods must have a pointer as their first parametersI%s: Methods must belong to the same namespace as the class they belong tos;%s: The first argument of methods cannot be an out-argumentRi(R~R)RRnRpR[R-RRR@RRKRLRERFRR/R0RRRyRCRtt_get_uscored_prefixRXRV(R2RRRRttuscored_prefix((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR|sD           - cCs|j||}|jj|jdj}|jjd|_|jj||j s|j j |}|j |t |d|_ t|_ n|jj|dS(Nii(RR-RR~RtpopRAR0tfloatR)RpR#R8RGRVtmethodsR(R2RRRRtt subsym_idx((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR} s  cCst}d}|jd}|jj|j}t|drs|jdk rs|j|j}|rs|j}qsn|s|j |j}n|S(NiRD( R[RCR~R-RRthasattrRDRXR(R2RRtprefix_matchesRt first_argRt((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRs cCs|j|}|dkrtS|\}}|dkr;tSt|tjrz|jj|||_|j j |t St|tj tj tjtjtjtjfr|j}||_|j j ||jd|j|_t StS(NRt.(RxRCR[R@RRKR0RRGtstatic_methodsRRVRLRERFRRRRtmoved_to(R2RRRRRtfuncnametnew_func((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR~.s&      cCs~|jj||j|||_|j||}|jj|t|_|j j sz|j ||j |j _ ndS(N( R0Rt_get_constructor_nameRGt_get_constructor_classt constructorsRRVRRRR (R2RRt origin_node((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR{Qs   cCsXd}|j|}|dkrH|jrT|jj|jj}qTn |\}}|S(N(RCRxRR-RRR(R2RRRRRU((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR`s   cCsId}|j|}|dkr9|jrE|j}qEn |\}}|S(N(RCRxRRG(R2RRRGRRU((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRks   cCs:|jdrtSd|kr#tS|jdr6tStS(Nt_newt_new_t_newv(RRVR[(R2Rp((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyt_guess_constructor_by_namevs cCs|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(Ns7%s: Constructors must return an instance of their classs3Can't find matching type for constructor; symbol=%rsN%s: Constructors must belong to the same namespace as the class they belong toisGObject.ObjectsRReturn value is not superclass for constructor; symbol=%r constructed=%r return=%rsCConstructor return type mismatch symbol=%r constructed=%r return=%r(RRRpR[R-RRRR@RRKRERFRRBRCRRRnRR/R0R8R~tgi_nameRRt create_typeRV(R2RRRtRRRe((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRzsp !     !         cCse|js dS|j}|jj|j}x/|jD]$}t|tjr8t|_ q8q8Wx|jD]}t|j tj sqjn|j }t |j dkrqjn|j dj}||krqjntjj|}|j d|_|j||j|}|jjd||jf} |j||g| |jj|qjWx|jD]}x|jD]} | j|jkrqrn| jj|jjkrqrnt | j t |j krqrnxOtt | j D]8} | j | j} |j | j} | | krqqqW| j|_|jj| j} |j|g| PqrWqbWdS(s2Look for virtual methods from the class structure.Nis%s::%s(tglib_type_structRR-RRWR@RR R[twritableRYRZR8R~RR1t from_callbackRAtinherit_file_positionsRR.RvRGRwRXRRRtxrangeRYRp(R2RRt node_typet class_structR^tcallbacktfirstparam_typeR]RORrtmethodRTtm_typetv_type((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyRMsP        cCs3t|tjr/|j||j|ntS(sKPass 3 is after we've loaded GType data and performed type closure.(R@RR|t_pass3_callable_callbackst_pass3_callable_throwsRV(R2RRR]((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyROs cCsd|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~WdS(saCheck to see if we have anything that looks like a callback+user_data+GDestroyNotify set.sGio.AsyncReadyCallbacksGLib.DestroyNotifytdataN(sGio.AsyncReadyCallbacksGLib.DestroyNotify(R~R-RRR@RRZRtPARAM_SCOPE_ASYNCR2RRRCR[RVRbR3R4RRRR5(R2RRRRhtargnodetcallback_paramtis_destroynotify((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR s6          cCsI|js dS|jd}|jjdkrE|jjt|_ndS(saCheck to see if we have anything that looks like a callback+user_data+GDestroyNotify set.NisGError**(R~RRyRRVtthrows(R2RRt last_param((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR/s    N(<t__name__t __module__R5RTR;RjRuRxR=R>RRR?RRCRRRRRRRRRR RRR{RR9R;RJRwRLRRRRRRNRWRbR<RPRxRJRR|R}RR~R{RRRRzRMRORR(((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyR,*sr  :      + 3   4 +  #  @ 3  &  &        ' !    )   #  F ;  $(3RRRRtannotationparserRRRRRRRR R R R R RRRRRRRRRRRRRRRRRRR R!R"R#R$R%R&R'R(R3R)tutilsR*R+tobjectR,(((s/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyts ^