lisp-take-1/value/integer/new.c
2024-11-28 18:36:25 -06:00

29 lines
495 B
C

#include <debug.h>
#include "../struct.h"
#include "../new.h"
#include "inheritance.h"
#include "struct.h"
#include "new.h"
struct value* new_integer_value(
struct gc* gc,
intmax_t value)
{
ENTER;
struct value* super = new_value(
/* gc: */ gc,
/* kind: */ vk_integer,
/* inheritance: */ &integer_value_inheritance);
struct integer_value* this = &super->subclass.integer;
this->value = value;
EXIT;
return super;
}