1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

Fixed the undocumented `scm_make_smob ()' function.

* libguile/smob.c (scm_make_smob): Use `SCM_RETURN_NEWSMOB ()' instead of
  `scm_cell ()' when instantiating the SMOB.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-27
This commit is contained in:
Ludovic Courtes 2006-05-23 21:59:56 +00:00 committed by Ludovic Courtès
parent e9d635e5d8
commit 4a6a4b492f

View file

@ -460,12 +460,13 @@ scm_set_smob_apply (scm_t_bits tc, SCM (*apply) (),
SCM
scm_make_smob (scm_t_bits tc)
{
long n = SCM_TC2SMOBNUM (tc);
scm_t_bits n = SCM_TC2SMOBNUM (tc);
size_t size = scm_smobs[n].size;
scm_t_bits data = (size > 0
? (scm_t_bits) scm_gc_malloc (size, SCM_SMOBNAME (n))
: 0);
return scm_cell (tc, data);
SCM_RETURN_NEWSMOB (tc, data);
}