[uim-commit] r2741 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Mon Jan 2 21:55:00 PST 2006
Author: yamaken
Date: 2006-01-02 21:54:54 -0800 (Mon, 02 Jan 2006)
New Revision: 2741
Modified:
branches/r5rs/sigscheme/sigschemeinternal.h
Log:
* sigscheme/sigschemeinternal.h
- (ENSURE_NO_MORE_ARG, ENSURE_PROPER_ARG_LIST): New macro which
implementation copied from correspondance of each ASSERT_*()
- (ASSERT_NO_MORE_ARG, ASSERT_PROPER_ARG_LIST): Rewrite with
ENSURE_*()
- (NO_MORE_ARG): Cosmetic change
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2006-01-03 05:44:30 UTC (rev 2740)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2006-01-03 05:54:54 UTC (rev 2741)
@@ -297,16 +297,19 @@
* prematurely, e.g. if an argument to "and" evaluates to #f. Both
* macros expand to no-ops #if !SCM_STRICT_ARGCHECK.
*/
+/* FIXME: replace ASSERT_NO_MORE_ARG() and ASSERT_PROPER_ARG_LIST() with these
+ appropriately */
+#define ENSURE_NO_MORE_ARG(args) \
+ (NO_MORE_ARG(args) || (ERR_OBJ("superfluous argument(s)", (args)), 1))
+#define ENSURE_PROPER_ARG_LIST(args) \
+ (scm_p_c_length(args) >= 0 || (ERR_OBJ("bad argument list", (args)), 1))
#if SCM_STRICT_ARGCHECK
-#define NO_MORE_ARG(args) \
- (!CONSP(args) \
- && (NULLP(args) \
+#define NO_MORE_ARG(args) \
+ (!CONSP(args) \
+ && (NULLP(args) \
|| (ERR_OBJ("improper argument list terminator", (args)), 1)))
-#define ASSERT_NO_MORE_ARG(args) \
- (NO_MORE_ARG(args) || (ERR_OBJ("superfluous argument(s)", (args)), 1))
-#define ASSERT_PROPER_ARG_LIST(args) \
- (scm_p_c_length(args) >= 0 \
- || (ERR_OBJ("bad argument list", (args)), 1))
+#define ASSERT_NO_MORE_ARG(args) ENSURE_NO_MORE_ARG(args)
+#define ASSERT_PROPER_ARG_LIST(args) ENSURE_PROPER_ARG_LIST(args)
#else /* not SCM_STRICT_ARGCHECK */
#define NO_MORE_ARG(args) (!CONSP(args))
#define ASSERT_NO_MORE_ARG(args)
More information about the uim-commit
mailing list