lisp-take-1/string/free.c

21 lines
252 B
C

#include <stdlib.h>
#include <debug.h>
#include "struct.h"
#include "free.h"
void free_string(
struct string* this)
{
ENTER;
if (this && !--this->refcount)
{
free(this->data);
free(this);
}
EXIT;
}