mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Removed the free function from the malloc-object SMOB type.
* libguile/mallocs.c (malloc_free): Removed. (scm_init_mallocs): Don't invoke `scm_set_smob_free ()' because the memory allocated by `scm_gc_malloc ()' will automatically be freed. Furthermore, `malloc_free ()' used to invoke `free ()' instead of `scm_gc_free ()' which is incorrect. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-25
This commit is contained in:
parent
53cc0209fa
commit
8574d367a9
1 changed files with 1 additions and 10 deletions
|
@ -41,14 +41,6 @@
|
|||
scm_t_bits scm_tc16_malloc;
|
||||
|
||||
|
||||
static size_t
|
||||
malloc_free (SCM ptr)
|
||||
{
|
||||
if (SCM_MALLOCDATA (ptr))
|
||||
free (SCM_MALLOCDATA (ptr));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
malloc_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
|
||||
|
@ -75,7 +67,6 @@ void
|
|||
scm_init_mallocs ()
|
||||
{
|
||||
scm_tc16_malloc = scm_make_smob_type ("malloc", 0);
|
||||
scm_set_smob_free (scm_tc16_malloc, malloc_free);
|
||||
scm_set_smob_print (scm_tc16_malloc, malloc_print);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue