From 227eff6a77dd58d64775fe91ae0f1596bfe3371b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 25 Jan 2010 23:41:27 +0100 Subject: [PATCH] Reinstate 2-word displacement for structs. * libguile/struct.c (scm_init_struct): Reinstate 2-word displacement removed by 01e74380f6170b5cb1105e5df9a368ab257420ef. --- libguile/struct.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libguile/struct.c b/libguile/struct.c index 6340a700c..4a9455517 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -997,6 +997,11 @@ scm_init_struct () default. */ GC_REGISTER_DISPLACEMENT (2 * sizeof (scm_t_bits) + scm_tc3_struct); + /* In the general case, `SCM_STRUCT_DATA (obj)' points 2 words after the + beginning of a GC-allocated region; that region is different from that of + OBJ once OBJ has undergone class redefinition. */ + GC_REGISTER_DISPLACEMENT (2 * sizeof (scm_t_bits)); + scm_struct_table = scm_make_weak_key_hash_table (scm_from_int (31)); required_vtable_fields = scm_from_locale_string (SCM_VTABLE_BASE_LAYOUT); required_applicable_fields = scm_from_locale_string (SCM_APPLICABLE_BASE_LAYOUT);