2009-01-23 Johan Dahlin <jdahlin@async.com.br>
* tests/everything/everything.c (test_enum_param):
* tests/everything/everything.h:
Add an enum param test function
svn path=/trunk/; revision=1066
+2009-01-23 Johan Dahlin <jdahlin@async.com.br>
+
+ * tests/everything/everything.c (test_enum_param):
+ * tests/everything/everything.h:
+
+ Add an enum param test function
+
2009-01-21 Johan Dahlin <jdahlin@async.com.br>
* configure.ac:
return etype;
}
+const gchar *
+test_enum_param(TestEnum e)
+{
+ GEnumValue *ev;
+ GEnumClass *ec;
+
+ ec = g_type_class_ref (test_enum_get_type ());
+ ev = g_enum_get_value (ec, e);
+ g_type_class_unref (ec);
+
+ return ev->value_nick;
+
+}
+
/* structures */
/**
GType test_flags_get_type (void) G_GNUC_CONST;
#define TES_TYPE_FLAGS (test_flags_get_type ())
+const gchar * test_enum_param(TestEnum e);
+
/* structures */
typedef struct _TestStructA TestStructA;
typedef struct _TestStructB TestStructB;