diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-01-18 16:42:17 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-02-03 00:02:36 +0100 |
commit | 202271f291971cf14175f5a1a193955f72d43d79 (patch) | |
tree | 2d472d565bbd58c81950ae53ba456f15e97e47d2 /libguile/smob.h | |
parent | c010924a71f942100dc7b4021d5ef1c6decf9c85 (diff) | |
download | guile-202271f291971cf14175f5a1a193955f72d43d79.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/smob.h')
-rw-r--r-- | libguile/smob.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libguile/smob.h b/libguile/smob.h index a4d70c8be..7aab3e74f 100644 --- a/libguile/smob.h +++ b/libguile/smob.h @@ -3,7 +3,7 @@ #ifndef SCM_SMOB_H #define SCM_SMOB_H -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2004, 2006, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -112,6 +112,9 @@ do { \ #define SCM_SMOB_APPLY_2(x, a1, a2) (SCM_SMOB_DESCRIPTOR (x).apply_2 (x, (a1), (a2))) #define SCM_SMOB_APPLY_3(x, a1, a2, rst) (SCM_SMOB_DESCRIPTOR (x).apply_3 (x, (a1), (a2), (rst))) +/* Maximum number of SMOB types. */ +#define SCM_I_MAX_SMOB_TYPE_COUNT 256 + SCM_API long scm_numsmob; SCM_API scm_smob_descriptor scm_smobs[]; |