diff --git a/src/c/alloc_2.d b/src/c/alloc_2.d index 96367ab9f..df5123287 100644 --- a/src/c/alloc_2.d +++ b/src/c/alloc_2.d @@ -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; } diff --git a/src/c/structure.d b/src/c/structure.d index 5fd9fcefc..350da1f8a 100644 --- a/src/c/structure.d +++ b/src/c/structure.d @@ -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 */