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

25 lines
320 B
C

#include <debug.h>
#include <memory/smalloc.h>
#include <extern/gmp/mini-mpq.h>
#include "struct.h"
#include "new.h"
struct number* new_number(void)
{
ENTER;
struct number* this = smalloc(sizeof(*this));
mpq_init(this->number);
this->refcount = 1;
EXIT;
return this;
}