lisp-take-1/value/environment/variable/new.c
2024-11-28 18:36:25 -06:00

27 lines
370 B
C

#include <debug.h>
#include <memory/smalloc.h>
#include <string/inc.h>
#include "struct.h"
#include "new.h"
struct variable* new_variable(
struct string* name,
struct value* value)
{
ENTER;
struct variable* this = smalloc(sizeof(*this));
this->name = inc_string(name);
this->value = value;
EXIT;
return this;
}