forked from external/yambar
particle: provide a default destroy() function
This allows us to destroy the associated decoration.
This commit is contained in:
parent
f65a18b655
commit
1427d6a98b
2 changed files with 10 additions and 1 deletions
|
@ -1,6 +1,14 @@
|
|||
#include "particle.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
void
|
||||
particle_default_destroy(struct particle *particle)
|
||||
{
|
||||
if (particle->deco != NULL)
|
||||
particle->deco->destroy(particle->deco);
|
||||
free(particle);
|
||||
}
|
||||
|
||||
struct particle *
|
||||
particle_common_new(int left_margin, int right_margin)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue