[uim-commit] r2153 - branches/r5rs/sigscheme
kzk at freedesktop.org
kzk at freedesktop.org
Fri Nov 18 14:42:59 PST 2005
Author: kzk
Date: 2005-11-18 14:42:53 -0800 (Fri, 18 Nov 2005)
New Revision: 2153
Modified:
branches/r5rs/sigscheme/sigschemetype-compact.h
Log:
* sigscheme/sigschemetype-compact.h
- (SCM_REF, SCM_REF_NULL): new macro. see r2152
- (SCM_REF_CAR, SCM_REF_CDR, SCM_SET): reimplemented
Modified: branches/r5rs/sigscheme/sigschemetype-compact.h
===================================================================
--- branches/r5rs/sigscheme/sigschemetype-compact.h 2005-11-18 22:29:56 UTC (rev 2152)
+++ branches/r5rs/sigscheme/sigschemetype-compact.h 2005-11-18 22:42:53 UTC (rev 2153)
@@ -605,11 +605,15 @@
Abstract ScmObj Reference For Storage-Representation Independent Efficient
List Operations
============================================================================*/
-#define SCM_REF_CAR(cons) (&SCM_CAR(cons))
-#define SCM_REF_CDR(cons) (&SCM_CDR(cons))
+#define SCM_REF_NULL NULL
+
+#define SCM_REF(obj) (&obj)
+#define SCM_REF_CAR(cons) (SCM_REF(SCM_GET_DIRECT_CAR(cons)))
+#define SCM_REF_CDR(cons) (SCM_REF(SCM_GET_DIRECT_CDR(cons)))
#define SCM_DEREF(ref) (*(ref))
+
/* RFC: Is there a better name? */
-#define SCM_SET(ref, obj) (*(ref) = (obj))
+#define SCM_SET(ref, obj) (*(ref) = (ScmObj)((SCM_CAST_UINT(*(ref)) & SCM_GCBIT_MASK) | SCM_CAST_UINT(obj)))
/*============================================================================
Compatibility for non-compact code
More information about the uim-commit
mailing list