* objects.c: #include "smob.h";
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Sun, 14 Mar 1999 16:52:15 +0000 (16:52 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Sun, 14 Mar 1999 16:52:15 +0000 (16:52 +0000)
(scm_class_keyword): Removed.  (Class is automatically created by
make_smob_classes.)
(scm_smob_class): Array of smob classes indexed by smobnum.
(scm_make_extended_class): "Plugin" function pointer for creation
of wrapper classes for smob and struct types.
(scm_class_of): Handle compiled closures.  (Currently regarded as
<procedure>.);
Use scm_smob_class to handle smob types;
Handle scm_tc16_bigpos, scm_tc16_bigneg, and, scm_tc16_keyword
through scm_smob_class;
Handle structs.
* smob.h (SCM_TC2SMOBNUM): New macro for conversion between tc16
type code and smobnum.

libguile/smob.h

index 9785a87..df33103 100644 (file)
@@ -57,7 +57,9 @@ typedef struct scm_smobfuns
 
 \f
 
-#define SCM_SMOBNUM(x) (0x0ff & (SCM_CAR(x)>>8))
+#define SCM_TC2SMOBNUM(x) (0x0ff & ((x) >> 8))
+#define SCM_SMOBNUM(x) (SCM_TC2SMOBNUM (SCM_CAR (x)))
+#define SCM_SMOBNAME(smobnum) 0 /* Smobs don't have names yet. */
 
 extern int scm_numsmob;
 extern scm_smobfuns *scm_smobs;