Files
glib/gobject
Emmanuel Fleury c4718596c2 gobject: Make enum/flags value lookups case-insensitive
Make g_enum_get_value_by_name(), g_flags_get_value_by_name(),
g_enum_get_value_by_nick() and g_flags_get_value_by_nick() perform ASCII
case-insensitive comparisons when matching names and nicks. This aligns
behavior with common expectations for user-visible nicks and reduces
rejections of mixed-case inputs.

Implementation switches from strcmp() to strcmp_ignore_case() when
comparing the provided name/nick to registered values.

This is a minor behavior change that only broadens accepted input. Types
with values that differ only by case are now allowed.

Tests: Extend gobject/tests/enums.c to cover mixed-case lookups for both
enums and flags (names and nicks).

Fixes: #74
2025-11-17 18:03:14 +01:00
..
2022-10-13 20:53:56 -04:00
2023-10-16 23:35:05 +01:00
2025-09-03 21:47:11 +02:00
2022-10-13 20:53:56 -04:00
2023-10-16 23:34:24 +01:00
2025-09-03 21:47:11 +02:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-10-23 11:26:53 +01:00