[uim-commit] r1424 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Sep 4 23:12:15 PDT 2005
Author: yamaken
Date: 2005-09-04 23:12:12 -0700 (Sun, 04 Sep 2005)
New Revision: 1424
Modified:
branches/r5rs/sigscheme/sigschemeinternal.h
Log:
* sigscheme/sigschemeinternal.h
- (SCM_REDUCE_EXT):
* Remove unused 'ridentity' arg
* Remove 'return' and parens from the code template to allow more
flexible expressions
* reorder args
- (SCM_REDUCE): Follow the changes of SCM_REDUCE_EXT
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-05 05:49:13 UTC (rev 1423)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-05 06:12:12 UTC (rev 1424)
@@ -167,20 +167,23 @@
*/
#define SCM_REDUCE(fexp, ridentity, lst, env, \
ctype, validp, extract, make, err_header) \
- SCM_REDUCE_EXT((accum = (fexp)), ridentity, lst, env, \
+ SCM_REDUCE_EXT((accum = (fexp)), \
+ return make(ridentity), \
+ return scm_elm, \
+ lst, env, \
ctype, validp, extract, make, \
- (make(ridentity)), scm_elm, err_header)
+ err_header)
-#define SCM_REDUCE_EXT(loop_exp, ridentity, lst, env, \
+#define SCM_REDUCE_EXT(exp_loop, exp0, exp1, lst, env, \
ctype, validp, extract, make, \
- res0, res1, err_header) \
+ err_header) \
do { \
ScmObj scm_elm, rest; \
ctype elm, accum; \
\
/* 0 */ \
if (NULLP(lst)) { \
- return (res0); \
+ exp0; \
} \
\
/* 1 */ \
@@ -190,7 +193,7 @@
SigScm_ErrorObj(err_header, scm_elm); \
return SCM_FALSE; \
} else if (NULLP(CDR(lst))) { \
- return (res1); \
+ exp1; \
} \
\
/* 2+ */ \
@@ -203,7 +206,7 @@
return SCM_FALSE; \
} \
elm = extract(scm_elm); \
- (loop_exp); \
+ exp_loop; \
} while (!NULLP(rest)); \
\
return make(accum); \
More information about the uim-commit
mailing list