mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Clarify GC-registered displacements for structs.
* libguile/struct.c (scm_init_struct): Remove unneeded `GC_REGISTER_DISPLACEMENT ()' call. Comment the remaining one.
This commit is contained in:
parent
aa42c03669
commit
01e74380f6
1 changed files with 4 additions and 3 deletions
|
@ -992,9 +992,10 @@ scm_print_struct (SCM exp, SCM port, scm_print_state *pstate)
|
||||||
void
|
void
|
||||||
scm_init_struct ()
|
scm_init_struct ()
|
||||||
{
|
{
|
||||||
GC_REGISTER_DISPLACEMENT (2*sizeof(scm_t_bits)); /* for the self data pointer */
|
/* The first word of a struct is equal to `SCM_STRUCT_DATA (vtable) +
|
||||||
GC_REGISTER_DISPLACEMENT (2*sizeof(scm_t_bits)
|
scm_tc3_struct', and `SCM_STRUCT_DATA (vtable)' is 2 words after VTABLE by
|
||||||
+ scm_tc3_struct); /* for the vtable data pointer */
|
default. */
|
||||||
|
GC_REGISTER_DISPLACEMENT (2 * sizeof (scm_t_bits) + scm_tc3_struct);
|
||||||
|
|
||||||
scm_struct_table = scm_make_weak_key_hash_table (scm_from_int (31));
|
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_vtable_fields = scm_from_locale_string (SCM_VTABLE_BASE_LAYOUT);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue