mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 23:50:19 +02:00
GOOPS: Statically allocate the SMOB class array.
* libguile/goops.c (scm_smob_class): Statically allocate it. (create_smob_classes): Don't malloc(3) `scm_smob_class'. * libguile/goops.h (scm_smob_class): Update declaration. * libguile/smob.c (scm_make_smob_type, scm_set_smob_apply): When checking whether GOOPS is initialized, check whether the first element of SCM_SMOB_CLASS is non-zero.
This commit is contained in:
parent
202271f291
commit
04795a1cb2
3 changed files with 6 additions and 7 deletions
|
@ -153,7 +153,7 @@ SCM scm_class_scm;
|
|||
SCM scm_class_int, scm_class_float, scm_class_double;
|
||||
|
||||
SCM *scm_port_class = 0;
|
||||
SCM *scm_smob_class = 0;
|
||||
SCM scm_smob_class[SCM_I_MAX_SMOB_TYPE_COUNT];
|
||||
|
||||
SCM scm_no_applicable_method;
|
||||
|
||||
|
@ -2694,7 +2694,6 @@ create_smob_classes (void)
|
|||
{
|
||||
long i;
|
||||
|
||||
scm_smob_class = scm_malloc (SCM_I_MAX_SMOB_TYPE_COUNT * sizeof (SCM));
|
||||
for (i = 0; i < SCM_I_MAX_SMOB_TYPE_COUNT; ++i)
|
||||
scm_smob_class[i] = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue