29 lines
405 B
C
29 lines
405 B
C
|
|
#include <debug.h>
|
|
|
|
#include <memory/smalloc.h>
|
|
|
|
#include <string/inc.h>
|
|
|
|
#include <value/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 = inc_value(value);
|
|
|
|
EXIT;
|
|
return this;
|
|
}
|
|
|
|
|