[uim-commit] r2247 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Thu Nov 24 02:15:36 PST 2005
Author: yamaken
Date: 2005-11-24 02:15:22 -0800 (Thu, 24 Nov 2005)
New Revision: 2247
Modified:
branches/r5rs/sigscheme/error.c
branches/r5rs/sigscheme/sigscheme.h
branches/r5rs/sigscheme/sigschemeinternal.h
Log:
* This commit makes dummy printing of no-object error message suppressed
* sigscheme/error.c
- (Scm_MakeErrorObj): Accept null objs
- (SigScm_Error): Pass SCM_NULL as error objs
* sigscheme/sigschemeinternal.h
- (SCM_ERROBJP): Move to sigscheme.h
- (LISTP, ASSERT_LISTP): New macro
* sigscheme/sigscheme.h
- (SCM_ERROBJP): Moved from sigschemeinternal.h
- (SCM_LISTP): New macro
Modified: branches/r5rs/sigscheme/error.c
===================================================================
--- branches/r5rs/sigscheme/error.c 2005-11-23 16:03:28 UTC (rev 2246)
+++ branches/r5rs/sigscheme/error.c 2005-11-24 10:15:22 UTC (rev 2247)
@@ -111,7 +111,7 @@
{
DECLARE_INTERNAL_FUNCTION("Scm_MakeErrorObj");
- ASSERT_CONSP(objs);
+ ASSERT_LISTP(objs);
#if 0
/* should be string, but not forced. displayable is sufficient. */
ASSERT_STRINGP(reason);
@@ -230,7 +230,7 @@
/* FIXME: provide replace vasprintf */
reason = strdup(msg);
#endif /* HAVE_VASPRINTF */
- err_obj = Scm_MakeErrorObj(Scm_NewImmutableString(reason), LIST_1(SCM_UNDEF));
+ err_obj = Scm_MakeErrorObj(Scm_NewImmutableString(reason), SCM_NULL);
Scm_RaiseError(err_obj);
/* NOTREACHED */
}
Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h 2005-11-23 16:03:28 UTC (rev 2246)
+++ branches/r5rs/sigscheme/sigscheme.h 2005-11-24 10:15:22 UTC (rev 2247)
@@ -84,6 +84,9 @@
#define SCM_ASSERT(cond) \
((cond) || SigScm_Die("assertion failed.", __FILE__, __LINE__))
+#define SCM_ERROBJP(obj) (NFALSEP(ScmOp_sscm_error_objectp(obj)))
+#define SCM_LISTP(obj) (CONSP(obj) || NULLP(obj))
+
#define SCM_SYMBOL_BOUNDP(sym) (!SCM_EQ(SCM_SYMBOL_VCELL(sym), SCM_UNBOUND))
#define SCM_CONS(kar, kdr) (Scm_NewCons((kar), (kdr)))
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2005-11-23 16:03:28 UTC (rev 2246)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2005-11-24 10:15:22 UTC (rev 2247)
@@ -112,8 +112,6 @@
#define SCM_FREECELL_SET_CDR(a, cdr) (SCM_FREECELL_CDR(a) = (cdr))
#endif
-#define SCM_ERROBJP(obj) (NFALSEP(ScmOp_sscm_error_objectp(obj)))
-
/* Prefix-less Abbreviation Names For Convenient Internal Use */
#define SYM_QUOTE SCM_SYM_QUOTE
#define SYM_QUASIQUOTE SCM_SYM_QUASIQUOTE
@@ -173,6 +171,7 @@
#define C_FUNCPOINTERP SCM_C_FUNCPOINTERP
#define ENVP SCM_ENVP
#define ERROBJP SCM_ERROBJP
+#define LISTP SCM_LISTP
#define CDBG SCM_CDBG
#define DBG SCM_DBG
@@ -299,6 +298,7 @@
#define ASSERT_PROCEDUREP(obj) ASSERT_TYPE(PROCEDUREP, "procedure", (obj))
#define ASSERT_ENVP(obj) ASSERT_TYPE(ENVP, "environment specifier", (obj))
#define ASSERT_ERROBJP(obj) ASSERT_TYPE(ERROBJP, "error object", (obj))
+#define ASSERT_LISTP(obj) ASSERT_TYPE(LISTP, "list", (obj))
/* Macros For Handling Continuation Object */
#define INVALID_CONTINUATION_OPAQUE NULL
More information about the uim-commit
mailing list