lambda-calc-1/statement/new.c
2025-01-13 20:36:07 -06:00

25 lines
372 B
C

#include <debug.h>
#include <memory/smalloc.h>
#include "struct.h"
#include "new.h"
struct statement* new_statement(
const struct statement_inheritance* inheritance,
size_t alloc_size)
{
ENTER;
struct statement* this = smalloc(alloc_size);
this->inheritance = inheritance;
this->refcount = 1;
EXIT;
return this;
}