diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-01-18 16:42:17 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-01-18 16:42:17 +0100 |
commit | c891a40e9fc5f718bfaf6e70f8fd0b19311d14a6 (patch) | |
tree | 734b544458f5f18ab87bdfbff15e686468bdfc3c /libguile/goops.c | |
parent | d0cad2492cd880fded45b4ab52afb61e6047b1ac (diff) | |
download | guile-c891a40e9fc5f718bfaf6e70f8fd0b19311d14a6.tar.gz |
Publish the maximum number of SMOB types as `SCM_I_MAX_SMOB_TYPE_COUNT'.
* libguile/goops.c (create_smob_classes): Refer to
`SCM_I_MAX_SMOB_TYPE_COUNT' rather than 255 (which is wrong) or 256.
* libguile/smob.c (MAX_SMOB_COUNT): Alias for `SCM_I_MAX_SMOB_TYPE_COUNT'.
* libguile/smob.h (SCM_I_MAX_SMOB_TYPE_COUNT): New macro.
Diffstat (limited to 'libguile/goops.c')
-rw-r--r-- | libguile/goops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/goops.c b/libguile/goops.c index 1bd56a9f0..e373a7ccc 100644 --- a/libguile/goops.c +++ b/libguile/goops.c @@ -2697,8 +2697,8 @@ create_smob_classes (void) { long i; - scm_smob_class = (SCM *) scm_malloc (255 * sizeof (SCM)); - for (i = 0; i < 255; ++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; scm_smob_class[SCM_TC2SMOBNUM (scm_tc16_keyword)] = scm_class_keyword; |