mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-03 03:10:06 +02:00
scanner: Support boolean constants
Aliasing TRUE or FALSE is not very common, but done occasionally for extra clarity. Namely G_SOURCE_REMOVE / G_SOURCE_CONTINUE are self-explanatory, unlike the "raw" booleans. https://bugzilla.gnome.org/show_bug.cgi?id=719566
This commit is contained in:
parent
4dfcf7bc21
commit
eb6b6f4fd5
@ -1010,10 +1010,10 @@ parse_float_value (const gchar *str)
|
||||
static gboolean
|
||||
parse_boolean_value (const gchar *str)
|
||||
{
|
||||
if (strcmp (str, "TRUE") == 0)
|
||||
if (g_ascii_strcasecmp (str, "TRUE") == 0)
|
||||
return TRUE;
|
||||
|
||||
if (strcmp (str, "FALSE") == 0)
|
||||
if (g_ascii_strcasecmp (str, "FALSE") == 0)
|
||||
return FALSE;
|
||||
|
||||
return parse_int_value (str) ? TRUE : FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user