/* Returns: (transfer none): the #GFlagsValue with nickname @nick, or NULL if there is no flag with that nickname  */
GFlagsValue* g_flags_get_value_by_nick(GFlagsClass *flags_class, const gchar *nick)
/* Returns: (transfer none): the #GFlagsValue with nickname @nick, or NULL if there is no flag with that nickname  */
GFlagsValue* g_flags_get_value_by_nick(GFlagsClass *flags_class, const gchar *nick)
{
  g_return_val_if_fail (G_IS_FLAGS_CLASS (flags_class), NULL);
  g_return_val_if_fail (nick != NULL, NULL);
  if (flags_class->n_values)
    {
      GFlagsValue *flags_value;
      for (flags_value = flags_class->values; flags_value->value_nick; flags_value++)
	if (flags_value->value_nick && strcmp (nick, flags_value->value_nick) == 0)
	  return flags_value;
    }
  return NULL;
}