Use case insensitive compare for signal "when" attribute

Update parser to use g_ascii_strcasecmp instead of strcmp. This fixes
incorrect flags being set when the incomming gir is using lowercase values
for the "when" attribute.

https://bugzilla.gnome.org/show_bug.cgi?id=709462
This commit is contained in:
Simon Feltman 2013-10-05 01:40:20 -07:00
parent 236d3375c6
commit 67ee43b667

View File

@ -2301,9 +2301,9 @@ start_glib_signal (GMarkupParseContext *context,
signal->run_first = FALSE;
signal->run_last = FALSE;
signal->run_cleanup = FALSE;
if (when == NULL || strcmp (when, "LAST") == 0)
if (when == NULL || g_ascii_strcasecmp (when, "LAST") == 0)
signal->run_last = TRUE;
else if (strcmp (when, "FIRST") == 0)
else if (g_ascii_strcasecmp (when, "FIRST") == 0)
signal->run_first = TRUE;
else
signal->run_cleanup = TRUE;