mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 22:01:36 -08:00
When creating structures and instances, always set instance.sig to a printable value, ECL_UNBOUND
This commit is contained in:
parent
cf1ff95534
commit
e8f57bdec6
2 changed files with 7 additions and 0 deletions
|
|
@ -269,6 +269,7 @@ ecl_alloc_instance(cl_index slots)
|
|||
i->instance.slots = (cl_object *)ecl_alloc(sizeof(cl_object) * slots);
|
||||
i->instance.length = slots;
|
||||
i->instance.entry = FEnot_funcallable_vararg;
|
||||
i->instance.sig = ECL_UNBOUND;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ si_structure_subtype_p(cl_object x, cl_object y)
|
|||
SLOTS(x) = NULL; /* for GC sake */
|
||||
SLENGTH(x) = --narg;
|
||||
SLOTS(x) = (cl_object *)ecl_alloc_align(sizeof(cl_object)*narg, sizeof(cl_object));
|
||||
#ifdef CLOS
|
||||
x->instance.sig = ECL_UNBOUND;
|
||||
#endif
|
||||
if (narg >= ECL_SLOTS_LIMIT)
|
||||
FEerror("Limit on structure size exceeded: ~S slots requested.",
|
||||
1, MAKE_FIXNUM(narg));
|
||||
|
|
@ -97,6 +100,9 @@ ecl_copy_structure(cl_object x)
|
|||
SLOTS(y) = NULL; /* for GC sake */
|
||||
SLOTS(y) = (cl_object *)ecl_alloc_align(size, sizeof(cl_object));
|
||||
memcpy(SLOTS(y), SLOTS(x), size);
|
||||
#ifdef CLOS
|
||||
y->instance.sig = x->instance.sig;
|
||||
#endif
|
||||
@(return y)
|
||||
}
|
||||
#endif /* !CLOS */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue