[uim-commit] r2920 - branches/r5rs/sigscheme/src
yamaken at freedesktop.org
yamaken at freedesktop.org
Sat Jan 14 13:41:33 PST 2006
Author: yamaken
Date: 2006-01-14 13:41:28 -0800 (Sat, 14 Jan 2006)
New Revision: 2920
Modified:
branches/r5rs/sigscheme/src/syntax.c
Log:
* sigscheme/src/syntax.c
- (ERRMSG_NON_BEGINNING_INTERNAL_DEFINITION): Removed
- (ERRMSG_BAD_DEFINE_PLACEMENT): New macro
- (scm_init_syntax): Fix lacking GC protection for syn_lambda
- (scm_s_body): Replace ERRMSG_NON_BEGINNING_INTERNAL_DEFINITION
with ERRMSG_BAD_DEFINE_PLACEMENT
Modified: branches/r5rs/sigscheme/src/syntax.c
===================================================================
--- branches/r5rs/sigscheme/src/syntax.c 2006-01-14 19:54:57 UTC (rev 2919)
+++ branches/r5rs/sigscheme/src/syntax.c 2006-01-14 21:41:28 UTC (rev 2920)
@@ -49,8 +49,7 @@
/*=======================================
File Local Macro Declarations
=======================================*/
-#define ERRMSG_NON_BEGINNING_INTERNAL_DEFINITION \
- "internal definition must not appear in a middle of <body>"
+#define ERRMSG_BAD_DEFINE_PLACEMENT "bad define placement"
/*=======================================
Variable Declarations
@@ -81,7 +80,9 @@
sym_yields = scm_intern("=>");
#if SCM_STRICT_ARGCHECK
sym_define = scm_intern("define");
- syn_lambda = scm_symbol_value(scm_intern("lambda"), SCM_INTERACTION_ENV);
+ scm_gc_protect_with_init(&syn_lambda,
+ scm_symbol_value(scm_intern("lambda"),
+ SCM_INTERACTION_ENV));
#endif
}
@@ -717,11 +718,11 @@
if (CONSP(body)) {
FOR_EACH_BUTLAST (exp, body) {
if (EQ(CAR(exp), sym_define))
- ERR_OBJ(ERRMSG_NON_BEGINNING_INTERNAL_DEFINITION, exp);
+ ERR_OBJ(ERRMSG_BAD_DEFINE_PLACEMENT, exp);
EVAL(exp, env);
}
if (EQ(CAR(exp), sym_define))
- ERR_OBJ(ERRMSG_NON_BEGINNING_INTERNAL_DEFINITION, exp);
+ ERR_OBJ(ERRMSG_BAD_DEFINE_PLACEMENT, exp);
} else {
eval_state->ret_type = SCM_VALTYPE_AS_IS;
}
More information about the uim-commit
mailing list