25 lines
391 B
C
25 lines
391 B
C
|
|
#include <debug.h>
|
|
|
|
#include "inheritance.h"
|
|
#include "struct.h"
|
|
#include "free.h"
|
|
|
|
void free_expression(
|
|
struct expression* this)
|
|
{
|
|
if (this)
|
|
{
|
|
if (!--this->refcount)
|
|
{
|
|
assert(this);
|
|
|
|
assert(this->inheritance);
|
|
|
|
assert(this->inheritance->free);
|
|
|
|
free(this);
|
|
}
|
|
}
|
|
}
|
|
|