[PATCH 3/3] Compile subsurface with gtk3

Linus Torvalds torvalds at linux-foundation.org
Mon Jan 28 07:55:33 PST 2013


Oh christ. Some over-eager search-and-replace caused this moronic end result:

On Sun, Jan 27, 2013 at 4:54 PM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> +/* Gtk made this "simpler" */
> +const char *get_active_text(GtkComboBox *combo_box)
> +{
> +       return get_active_text(combo_box);
> +}

Which is obviously bogus.

Explanation: it *should* have done

    return gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combo_box))));

but because that's such an ugly pattern, I created that
"get_active_text()" helper function, and then did a search-and-replace
of that horribly ugly pattern with just "get_active_text()".

But it replaced the text inside the helper function too, so how the
helper function just called itself rather than do the right thing. And
this is mainly used for some equipment stuff, so I didn't notice.

I'll re-do the series, but I'll test some more first.

                 Linus


More information about the subsurface mailing list