GEEKERY  
ADVENTURE  
CONTEMPLATION  

20100610

today's favorite

Anything wrong with this picture?  Just goes to show you how young Vala is...this is valac generated C.

static gboolean _gdk_atom_equal (const GdkAtom* s1, const GdkAtom* s2) {
    if (s1 == s2) {
        return TRUE;
    }
    if (s1 == NULL) {
        return FALSE;
    }
    if (s2 == NULL) {
        return FALSE;
    }
    return TRUE;
}

2 comments:

Jeff Kaufman said...

perhaps that last "return TRUE" should instead be "return s1.isEqual(s2)" ?

ajb said...

That last "return TRUE" is why I found it funny, but the problems don't end there...GdkAtom is a strange beast. See the bug report for more details:
https://bugzilla.gnome.org/show_bug.cgi?id=621321