summaryrefslogtreecommitdiff
path: root/libguile/goops.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2015-01-11 16:36:45 +0100
committerAndy Wingo <wingo@pobox.com>2015-01-23 16:16:02 +0100
commit92928b8619d2711e9e05b94831a479525ba9aede (patch)
tree21978fd82a49db5db06ab970a62107a2901ea9f2 /libguile/goops.c
parent4702cbeb3780d0c81076bae0723a1fd544576471 (diff)
downloadguile-92928b8619d2711e9e05b94831a479525ba9aede.tar.gz
Re-use the vtable "size" field for GOOPS nfields
* module/oop/goops.scm (fold-<class>-slots): The first "reserved" slot is actually for instance sizes, used by the "simple struct" mechanism. Reuse this field for GOOPS's "nfields". (make-standard-class, <class>, initialize): Adapt order of field initializations. * libguile/goops.h (SCM_CLASS_CLASS_LAYOUT, SCM_N_CLASS_SLOTS) * libguile/goops.c (scm_sys_allocate_instance): Adapt.
Diffstat (limited to 'libguile/goops.c')
-rw-r--r--libguile/goops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/goops.c b/libguile/goops.c
index 37e3fd2b5..05bc06e15 100644
--- a/libguile/goops.c
+++ b/libguile/goops.c
@@ -544,7 +544,7 @@ SCM_DEFINE (scm_sys_allocate_instance, "%allocate-instance", 2, 0, 0,
/* FIXME: duplicates some of scm_make_struct. */
- n = SCM_I_INUM (SCM_SLOT (class, scm_si_nfields));
+ n = SCM_STRUCT_DATA_REF (class, scm_vtable_index_size);
obj = scm_i_alloc_struct (SCM_STRUCT_DATA (class), n);
layout = SCM_VTABLE_LAYOUT (class);