mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +02:00
Removed the now-useless `scm_struct_free_*' functions.
* libguile/struct.c (scm_alloc_struct): Set the `scm_struct_i_free' element to 0 instead of `scm_struct_free_standard'. (scm_struct_free_0): Removed. (scm_struct_free_light): Removed. (scm_struct_free_standard): Removed. (scm_struct_free_entity): Removed. * libguile/struct.h (scm_struct_free_0): Removed. (scm_struct_free_light): Removed. (scm_struct_free_standard): Removed. (scm_struct_free_entity): Removed. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-35
This commit is contained in:
parent
077644c8a4
commit
6cc80cb6ab
2 changed files with 1 additions and 35 deletions
|
@ -306,7 +306,7 @@ scm_alloc_struct (int n_words, int n_extra, const char *what)
|
|||
p = (scm_t_bits *) (((scm_t_bits) p + 7) & ~7);
|
||||
|
||||
/* Initialize a few fields as described above. */
|
||||
p[scm_struct_i_free] = (scm_t_bits) scm_struct_free_standard;
|
||||
p[scm_struct_i_free] = (scm_t_bits) 0;
|
||||
p[scm_struct_i_ptr] = (scm_t_bits) block;
|
||||
p[scm_struct_i_n_words] = n_words;
|
||||
p[scm_struct_i_flags] = 0;
|
||||
|
@ -346,36 +346,6 @@ struct_finalizer_trampoline (GC_PTR ptr, GC_PTR unused_data)
|
|||
|
||||
|
||||
|
||||
void
|
||||
scm_struct_free_0 (scm_t_bits * vtable SCM_UNUSED,
|
||||
scm_t_bits * data SCM_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
scm_struct_free_light (scm_t_bits * vtable, scm_t_bits * data)
|
||||
{
|
||||
size_t n = vtable [scm_struct_i_size] & ~SCM_STRUCTF_MASK;
|
||||
scm_gc_free (data, n, "struct");
|
||||
}
|
||||
|
||||
void
|
||||
scm_struct_free_standard (scm_t_bits * vtable SCM_UNUSED, scm_t_bits * data)
|
||||
{
|
||||
size_t n = (data[scm_struct_i_n_words] + scm_struct_n_extra_words)
|
||||
* sizeof (scm_t_bits) + 7;
|
||||
scm_gc_free ((void *) data[scm_struct_i_ptr], n, "heavy struct");
|
||||
}
|
||||
|
||||
void
|
||||
scm_struct_free_entity (scm_t_bits * vtable SCM_UNUSED, scm_t_bits * data)
|
||||
{
|
||||
size_t n = (data[scm_struct_i_n_words] + scm_struct_entity_n_extra_words)
|
||||
* sizeof (scm_t_bits) + 7;
|
||||
scm_gc_free ((void *) data[scm_struct_i_ptr], n, "entity struct");
|
||||
}
|
||||
|
||||
|
||||
|
||||
SCM_DEFINE (scm_make_struct, "make-struct", 2, 0, 1,
|
||||
(SCM vtable, SCM tail_array_size, SCM init),
|
||||
|
|
|
@ -84,10 +84,6 @@ SCM_API SCM scm_struct_table;
|
|||
|
||||
SCM_API scm_t_bits * scm_alloc_struct (int n_words, int n_extra,
|
||||
const char *what);
|
||||
SCM_API void scm_struct_free_0 (scm_t_bits * vtable, scm_t_bits * data);
|
||||
SCM_API void scm_struct_free_light (scm_t_bits * vtable, scm_t_bits * data);
|
||||
SCM_API void scm_struct_free_standard (scm_t_bits * vtable, scm_t_bits * data);
|
||||
SCM_API void scm_struct_free_entity (scm_t_bits * vtable, scm_t_bits * data);
|
||||
SCM_API SCM scm_make_struct_layout (SCM fields);
|
||||
SCM_API SCM scm_struct_p (SCM x);
|
||||
SCM_API SCM scm_struct_vtable_p (SCM x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue