[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Gtk2 1.162 build errors on PangoLayout test
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Gtk2 1.162 build errors on PangoLayout test
- Date: Thu, 15 Nov 2007 19:51:28 +0100
On Fri, 2007-11-16 at 03:22 +0900, Kim Do-hyoung Keedi wrote:
> Thanks for reply. This is the code snippet in xs directory.
There's only one difference to what my version of xsubpp (1.9508)
generates:
> 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);
XSprePUSH; ++SP; EXTEND(SP,2);
> PUSHs(sv_newmortal());
> sv_setiv(ST(1), (IV)index_);
> PUSHs(sv_newmortal());
> sv_setiv(ST(2), (IV)trailing);
> }
> XSRETURN(3);
> }
Let's see what happens if we avoid OUTLIST altogether: when you apply
the attached patch, do you still see the problem after recompilation?
--
Bye,
-Torsten
Index: xs/PangoLayout.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/PangoLayout.xs,v
retrieving revision 1.32
diff -u -d -p -r1.32 PangoLayout.xs
--- xs/PangoLayout.xs 3 Oct 2007 17:27:27 -0000 1.32
+++ xs/PangoLayout.xs 15 Nov 2007 18:49:48 -0000
@@ -513,7 +513,18 @@ int pango_layout_get_unknown_glyphs_coun
MODULE = Gtk2::Pango::Layout PACKAGE = Gtk2::Pango::LayoutLine PREFIX = pango_layout_line_
## gboolean pango_layout_line_x_to_index (PangoLayoutLine *line, int x_pos, int *index_, int *trailing)
-gboolean pango_layout_line_x_to_index (PangoLayoutLine *line, int x_pos, OUTLIST int index_, OUTLIST int trailing);
+void
+pango_layout_line_x_to_index (PangoLayoutLine *line, int x_pos)
+ PREINIT:
+ gboolean result;
+ int index_ = 0;
+ int trailing = 0;
+ PPCODE:
+ result = pango_layout_line_x_to_index (line, x_pos, &index_, &trailing);
+ EXTEND (SP, 3);
+ PUSHs (sv_2mortal (newSVuv (result)));
+ PUSHs (sv_2mortal (newSViv (index_)));
+ PUSHs (sv_2mortal (newSViv (trailing)));
## void pango_layout_line_index_to_x (PangoLayoutLine *line, int index_, gboolean trailing, int *x_pos)
void pango_layout_line_index_to_x (PangoLayoutLine *line, int index_, gboolean trailing, OUTLIST int x_pos);
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]