All pastes #804007 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-12-03 00:51 UTC
rendered paste body
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
}