Let's make it more alike most of our other destructors.
}
}
-void calendar_spec_free(CalendarSpec *c) {
+CalendarSpec* calendar_spec_free(CalendarSpec *c) {
if (!c)
- return;
+ return NULL;
free_chain(c->year);
free_chain(c->month);
free_chain(c->microsecond);
free(c->timezone);
- free(c);
+ return mfree(c);
}
static int component_compare(const void *_a, const void *_b) {
CalendarComponent *microsecond;
} CalendarSpec;
-void calendar_spec_free(CalendarSpec *c);
+CalendarSpec* calendar_spec_free(CalendarSpec *c);
int calendar_spec_normalize(CalendarSpec *spec);
bool calendar_spec_valid(CalendarSpec *spec);