aboutsummaryrefslogtreecommitdiffstats
path: root/libgamma_site_destroy.c
blob: 4ccc795b77849f020e4d71546acd4aafa548263a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* See LICENSE file for copyright and license details. */
#include "common.h"


/**
 * Release all resources held by a site state
 * 
 * @param  this  The site state
 */
void
libgamma_site_destroy(struct libgamma_site_state *restrict this)
{
	switch (this->method) {
#define X(CONST, CNAME, ...)\
	case CONST:\
		libgamma_##CNAME##_site_destroy(this);\
		break;
	LIST_AVAILABLE_METHODS(X)
#undef X
	default:
		break;
	}
	free(this->site);
}