From 67ee43b667cb338c9608d2b4bbf1793c09b55fbc Mon Sep 17 00:00:00 2001 From: Simon Feltman Date: Sat, 5 Oct 2013 01:40:20 -0700 Subject: [PATCH] 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 --- girparser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/girparser.c b/girparser.c index f96cfb1e0..6fbf2a6b2 100644 --- a/girparser.c +++ b/girparser.c @@ -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;