Пример #1
0
/**
 * Reset header object, for new header parsing.
 */
void
header_reset(header_t *o)
{
	header_check(o);

	if (o->headers) {
		g_hash_table_foreach_remove(o->headers, free_header_data, NULL);
		gm_hash_table_destroy_null(&o->headers);
	}
	slist_free_all(&o->fields, cast_to_slist_destroy(hfield_free));
	o->flags = o->size = o->num_lines = 0;
}
Пример #2
0
/**
 * Free the pmsg list, including the list container, nullifying its pointer.
 */
void
pmsg_slist_free_all(slist_t **slist_ptr)
{
	slist_free_all(slist_ptr, cast_to_slist_destroy(pmsg_free));
}