Re: GtkAllocation accessor
- From: Tadej Borovšak <tadeboro gmail com>
- To: Patrick Welche <prlw1 cam ac uk>
- Cc: gtk-list gnome org
- Subject: Re: GtkAllocation accessor
- Date: Wed, 2 Jun 2010 15:23:21 +0200
Hello.
> #if GTK_CHECK_VERSION (2,18,0)
> static GtkAllocation *dasher_get_widget_allocation(GtkWidget *w)
> {
> GtkAllocation a;
>
> gtk_widget_get_allocation(w, &a);
>
> return &a;
> }
> #endif
Just don't do this. Returning a pointer to a stack-allocated structure
is just screaming "SIGSEGV".
I can agree that updating applications to work with GTK+-3 will be a
major pain in the *** in some cases (yours being one example), but I
fail to see why would newly written applications need to suffer from
inconsistent API just to make old apps a bit happier (they will still
need to be updated).
Tadej
--
Tadej Borovšak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]