lambda-calc-1/istream/new.c
2025-01-20 13:40:51 -06:00

26 lines
385 B
C

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