typedef struct { const char *name; GBoxedCopyFunc boxed_copy; GBoxedFreeFunc boxed_free; } BoxedTest; BoxedTest tests[] = { {"GDate", g_date_copy, g_date_free}, {"bla", bla_copy, bla_free}, {NULL, NULL, NULL} } ... BoxedTest *iter; for (iter = tests; iter->name; iter++) { //do the test here }