[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Gtk2 1.162 build errors on PangoLayout test



On Thu, 15 Nov 2007 17:08:59 +0100, Torsten Schoenfeld wrote:
> Can you take a look at the generated file xs/PangoLayout.c and post
the
> contents of the function XS(XS_Gtk2__Pango__LayoutLine_x_to_index)?

Torsten,
Thanks for reply. This is the code snippet in xs directory.

xs/PangoLayout.c:
XS(XS_Gtk2__Pango__LayoutLine_x_to_index); /* prototype to pass
-Wmissing-prototypes */
XS(XS_Gtk2__Pango__LayoutLine_x_to_index)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 2)
       Perl_croak(aTHX_ "Usage: %s(%s)",
"Gtk2::Pango::LayoutLine::x_to_index", "line, x_pos");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	gboolean	RETVAL;
	PangoLayoutLine *	line = SvPangoLayoutLine (ST(0));
	int	x_pos = (int)SvIV(ST(1));
	int	index_;
	int	trailing;

	RETVAL = pango_layout_line_x_to_index(line, x_pos, &index_, &trailing);
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setiv(ST(1), (IV)index_);
	PUSHs(sv_newmortal());
	sv_setiv(ST(2), (IV)trailing);
    }
    XSRETURN(3);
}

----
Keedi Kim




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]