[uim-commit] r1589 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Sep 25 06:21:36 PDT 2005
Author: yamaken
Date: 2005-09-25 06:21:34 -0700 (Sun, 25 Sep 2005)
New Revision: 1589
Modified:
branches/r5rs/sigscheme/TODO
branches/r5rs/sigscheme/sigschemeinternal.h
branches/r5rs/sigscheme/sigschemetype.h
Log:
* This commit introduces the abstract ScmObj reference for
storage-representation independent efficient list operations
* sigscheme/sigschemetype.h
- (ScmRef): New type
- (SCM_REF_CAR, SCM_REF_CDR, SCM_DEREF, SCM_SET): New macro
* sigscheme/sigschemeinternal.h
- (DEREF, SET, REF_CAR, REF_CDR): New macro
* sigscheme/TODO
- Update
Modified: branches/r5rs/sigscheme/TODO
===================================================================
--- branches/r5rs/sigscheme/TODO 2005-09-25 12:37:38 UTC (rev 1588)
+++ branches/r5rs/sigscheme/TODO 2005-09-25 13:21:34 UTC (rev 1589)
@@ -20,7 +20,8 @@
API for such purpose is existing, use it
- [uim] Implement string-escape as same as trunk
-* Fix invalid storage model assumption of ScmOp_append()
+* Fix invalid storage model assumption of ScmOp_append() and qquote_internal()
+ with ScmRef
* Add error message printing function which properly uses stderr, and replace
inappropriate 'printf' with it
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-25 12:37:38 UTC (rev 1588)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-25 13:21:34 UTC (rev 1589)
@@ -121,6 +121,11 @@
#define LIST_4 SCM_LIST_4
#define LIST_5 SCM_LIST_5
+#define DEREF SCM_DEREF
+#define SET SCM_SET
+#define REF_CAR SCM_REF_CAR
+#define REF_CDR SCM_REF_CDR
+
#define EVAL SCM_EVAL
#define INTP SCM_INTP
Modified: branches/r5rs/sigscheme/sigschemetype.h
===================================================================
--- branches/r5rs/sigscheme/sigschemetype.h 2005-09-25 12:37:38 UTC (rev 1588)
+++ branches/r5rs/sigscheme/sigschemetype.h 2005-09-25 13:21:34 UTC (rev 1589)
@@ -49,6 +49,7 @@
=======================================*/
typedef struct ScmObjInternal_ ScmObjInternal;
typedef ScmObjInternal *ScmObj;
+typedef ScmObj *ScmRef;
typedef struct _ScmPortInfo ScmPortInfo;
typedef struct ScmEvalState_ ScmEvalState;
typedef ScmObj (*ScmFuncType)();
@@ -435,6 +436,16 @@
#define SCM_C_FUNCPOINTER_SET_VALUE(a, funcptr) (SCM_C_FUNCPOINTER_VALUE(a) = funcptr)
/*============================================================================
+ Abstract ScmObj Reference For Storage-Representation Independent Efficient
+ List Operations
+============================================================================*/
+#define SCM_REF_CAR(obj) (&SCM_CAR(obj))
+#define SCM_REF_CDR(obj) (&SCM_CDR(obj))
+#define SCM_DEREF(ref) (*(ref))
+/* RFC: Is there a better name? */
+#define SCM_SET(ref, obj) (*(ref) = (obj))
+
+/*============================================================================
Special Constants
============================================================================*/
#define SCM_NULL SigScm_null
More information about the uim-commit
mailing list