ó ¿×:Uc@€sJddlmZddlmZddlmZdefd„ƒYZdS(iÿÿÿÿ(twith_statement(tcontextmanageri(tasttCCodeGeneratorcB€s‰eZgggggd„Zd„Zd„Zd„Zd„Zd„Zd„Ze d„ƒZ d„Z d „Z d „Z d „ZRS( c C€sU||_||_||_||_||_||_||_i|_||_dS(N( tout_h_filenametout_c_filenametfunction_decorationtinclude_first_headertinclude_last_headertinclude_first_srctinclude_last_srct_function_bodiest namespace( tselfR RRRRRR R ((sq/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt__init__s        cC€s*|jddƒ}d|jjd|fS(Nt t_s%s_%si(treplaceR tsymbol_prefixes(R tname((sq/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt gen_symbol/scC€s‚t|tjƒr6|jtjtjfkr6d}nd}|jjtjtj fƒrt|j tj krtd|S|jj |S(Nt*ts const gchar*( t isinstanceRt Parametert directiontPARAM_DIRECTION_OUTtPARAM_DIRECTION_INOUTttypetis_equivt TYPE_STRINGt TYPE_FILENAMEttransfertPARAM_TRANSFER_NONEtctype(R tparamtsuffix((sq/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt_typecontainer_to_ctype3s cC€sñ|jr)|jddj|jƒƒn|jd|j|jƒ|jfƒt|jƒ}|jrÓxvt|jƒD]U\}}|j|ƒ}|jd||j fƒ||dkrw|jdƒqwqwWn |jdƒ|jdƒdS( Ns %sRs %s %s (s%s %sis, tvoidt)( RtwritetjoinR%tretvaltsymboltlent parameterst enumeratetargname(R touttfunctltiR#R"((sq/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt_write_prelude@s    cC€s'|j|j|ƒ|jjdƒdS(Ns; (R4tout_hR((R R1((sq/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt_write_prototypeSscC€s|jjd|fƒdS(Ns (transfer %s)(tout_cR((R R ((sq/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt_write_annotation_transferWscC€s"|jjd|jfƒxž|jD]“}|jjd|jfƒ|jtjtjfkr§|j rqd}nd}|jjd|j|fƒ|j |j ƒn|jjdƒq$W|jjdƒ|jjdƒ|jjdƒ|jjd ƒ|j |j j ƒ|jjd ƒdS( Ns /** * %s: s * @%s: s caller-allocatesRs(%s%s) s: s * s * Undocumented. s * Returns: s */( R7R(R+R-R/RRRRtcaller_allocatesR8R R*(R R1R#tallocate_string((sq/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt _write_docsZs$    cc€sV|j|ƒ|j|ƒ|j|j|ƒ|jjdƒdV|jjdƒdS(Ns { s} (R6R;R4R7R((R R1((sq/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt _functionos   cC€sd}|jj|ƒ|jjjƒ}x%|jD]}|jjd|ƒq2W|jjd||fƒx%|jD]}|jjd|ƒqtW|jj|ƒx%|jD]}|jjd|ƒq¬W|jjd|j fƒx%|j D]}|jjd|ƒqîWdS(Ns0/* GENERATED BY testcodegen.py; DO NOT EDIT */ s#include "%s" s> #ifndef __%s_H__ #define __%s_H__ #include s#include "%s" ( R5R(R RtupperRRR7R RR (R twarningtnsuppertheader((sq/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt_codegen_startxs cC€s.|jjdƒ|jjƒ|jjƒdS(Ns#endif (R5R(tcloseR7(R ((sq/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt _codegen_end•s cC€s||j|s