Hi,

On Fri, Apr 17, 2009 at 9:38 PM, Brian J. Tarricone <bj...@cornell.edu> wrote:
> I assume the issue was with returning a non-primitive type by-value and not
> as a pointer.

Right. The normal way in glib/gtk would definitely be as you say.

> void
> gtk_widget_get_allocation (GtkWidget     *widget,
>                           GtkAllocation *allocation)
> {
>    g_return_if_fail (GTK_IS_WIDGET (widget) && allocation);

but this should be two separate checks

>    memcpy (allocation, &widget->allocation, sizeof(*allocation));

and just:
 *allocation = widget->allocation;

should be fine.

Presumably some core gtk dev was arguing for the weird way though or
someone would have just fixed it ;-)

Havoc
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to