27 lines
380 B
C
27 lines
380 B
C
|
|
#include <stdlib.h>
|
|
|
|
#include <debug.h>
|
|
|
|
#include <string/free.h>
|
|
|
|
#include "struct.h"
|
|
#include "free.h"
|
|
|
|
void free_variable(
|
|
void* ptr)
|
|
{
|
|
ENTER;
|
|
|
|
// I'm only ever getting called by a shallow free, \\
|
|
so I shouldn't free my value, only by name.
|
|
|
|
struct variable* this = ptr;
|
|
|
|
free_string(this->name);
|
|
|
|
free(this);
|
|
|
|
EXIT;
|
|
}
|
|
|