Problem with layout_iter_copy with Pango 1.29.3

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;

Hi,

In CADdV=Ms3EF4d=9NaeApKPQUhnBhTTptN8nYeTAj=removed_email_address@domain.invalid
“[ruby-gnome2-devel-en] Problem with layout_iter_copy with Pango
1.29.3” on Wed, 14 Sep 2011 15:31:58 +0200,
Nikolai W. [email protected] 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

2011/9/15 Kouhei S. [email protected]:

Nikolai W. [email protected] 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.