Hi!
It seems that PangoLayoutIter is an opaque type. Thus, the following
code won’t work:
static PangoLayoutIter*
layout_iter_copy(const PangoLayoutIter *ref)
{
#if PANGO_CHECK_VERSION(1,6,0)
PangoLayoutIter* new_ref;
g_return_val_if_fail (ref != NULL, NULL);
/* This may be broken on pango-1.2.x, but
for backward compatibility. */
new_ref = g_new(PangoLayoutIter, 1);
*new_ref = *ref;
return new_ref;
#else
return (PangoLayoutIter*)ref;
#endif
}
I am at a loss as to why this is set up as such, but my suggestion is
that we simply remove the #if and return (PangoLayoutIter *)ref;
on 2011-09-14 15:32
on 2011-09-15 15:09
Hi, In <CADdV=Ms3EF4d=9NaeApKPQUhnBhTTptN8nYeTAj=iT3Y6q01sQ@mail.gmail.com> "[ruby-gnome2-devel-en] Problem with layout_iter_copy with Pango 1.29.3" on Wed, 14 Sep 2011 15:31:58 +0200, Nikolai Weibull <now@bitwi.se> wrote: > for backward compatibility. */ > new_ref = g_new(PangoLayoutIter, 1); > *new_ref = *ref; > return new_ref; > #else > return (PangoLayoutIter*)ref; > #endif > } > > I am at a loss as to why this is set up as such, but my suggestion is > that we simply remove the #if and return (PangoLayoutIter *)ref; I agree with you. Please remove it! Thanks, -- kou
on 2011-09-15 17:03
2011/9/15 Kouhei Sutou <kou@cozmixng.org>: > Nikolai Weibull <now@bitwi.se> wrote: >> I am at a loss as to why this is set up as such, but my suggestion is >> that we simply remove the #if and return (PangoLayoutIter *)ref; > I agree with you. Please remove it! Done.
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.