particle: provide a default destroy() function

This allows us to destroy the associated decoration.
This commit is contained in:
Daniel Eklöf 2018-12-26 21:34:19 +01:00
parent f65a18b655
commit 1427d6a98b
2 changed files with 10 additions and 1 deletions

View file

@ -14,7 +14,7 @@ struct particle {
void *private;
int left_margin, right_margin;
const struct deco *deco;
struct deco *deco;
void (*destroy)(struct particle *particle);
struct exposable *(*instantiate)(const struct particle *particle,
@ -35,3 +35,4 @@ struct exposable {
};
struct particle *particle_common_new(int left_margin, int right_margin);
void particle_default_destroy(struct particle *particle);