/* Returns: (transfer none): the #GEnumValue with nickname @nick, or NULL if the enumeration doesn't have a member with that nickname  */
GEnumValue* g_enum_get_value_by_nick(GEnumClass *enum_class, const gchar *nick)
/* Returns: (transfer none): the #GEnumValue with nickname @nick, or NULL if the enumeration doesn't have a member with that nickname  */
GEnumValue* g_enum_get_value_by_nick(GEnumClass *enum_class, const gchar *nick)
{
  g_return_val_if_fail (G_IS_ENUM_CLASS (enum_class), NULL);
  g_return_val_if_fail (nick != NULL, NULL);
  if (enum_class->n_values)
    {
      GEnumValue *enum_value;
      for (enum_value = enum_class->values; enum_value->value_name; enum_value++)
	if (enum_value->value_nick && strcmp (nick, enum_value->value_nick) == 0)
	  return enum_value;
    }
  return NULL;
}