1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

* smob.c (scm_newsmob): Also create a wrapper class if

scm_smob_class has been initialized.
This commit is contained in:
Mikael Djurfeldt 1999-03-14 16:51:55 +00:00
parent 0e76bf6680
commit d7ec6b9f78

View file

@ -45,6 +45,8 @@
#include "smob.h"
#include "objects.h"
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
@ -81,6 +83,10 @@ scm_newsmob (smob)
SCM_ALLOW_INTS;
if (!tmp)
smoberr:scm_wta (SCM_MAKINUM ((long) scm_numsmob), (char *) SCM_NALLOC, "newsmob");
/* Make a class object if Goops is present. */
if (scm_smob_class)
scm_smob_class[scm_numsmob - 1]
= scm_make_extended_class (SCM_SMOBNAME (scm_numsmob - 1));
return scm_tc7_smob + (scm_numsmob - 1) * 256;
}