25 lines
320 B
C
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;
|
|
}
|
|
|
|
|