[uim-commit] r2127 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Nov 13 07:57:10 PST 2005
Author: yamaken
Date: 2005-11-13 07:57:05 -0800 (Sun, 13 Nov 2005)
New Revision: 2127
Modified:
branches/r5rs/sigscheme/operations-new-srfi34.c
Log:
* sigscheme/operations-new-srfi34.c
- (global_obj_list): New static variable
- (SigScm_Initialize_SRFI34): Fix lacking GC protection for global
variables
Modified: branches/r5rs/sigscheme/operations-new-srfi34.c
===================================================================
--- branches/r5rs/sigscheme/operations-new-srfi34.c 2005-11-13 15:29:51 UTC (rev 2126)
+++ branches/r5rs/sigscheme/operations-new-srfi34.c 2005-11-13 15:57:05 UTC (rev 2127)
@@ -86,6 +86,20 @@
static ScmObj syn_guard_internal, syn_guard_handler, syn_guard_handler_body;
static ScmObj syn_guard_body;
+static ScmObj *global_obj_list[] = {
+ ¤t_exception_handlers,
+ &errmsg_unhandled_exception, &errmsg_handler_returned,
+ &sym_error, &sym_raise,
+ &sym_lex_env, &sym_cond_catch, &sym_body,
+ &sym_condition, &sym_guard_k, &sym_handler_k,
+ &syn_apply, &proc_values,
+ &syn_set_cur_handlers, &proc_fallback_handler,
+ &proc_with_exception_handlers,
+ &syn_guard_internal, &syn_guard_handler, &syn_guard_handler_body,
+ &syn_guard_body,
+ NULL
+};
+
/*=======================================
File Local Function Declarations
=======================================*/
@@ -101,8 +115,16 @@
=======================================*/
void SigScm_Initialize_SRFI34(void)
{
+ ScmObj **var;
+
Scm_use("srfi-23");
+ /* protect global variables */
+ for (var = &global_obj_list[0]; *var; var++) {
+ **var = SCM_FALSE;
+ SigScm_GC_Protect(*var);
+ }
+
errmsg_unhandled_exception = MAKE_STR_COPYING(ERRMSG_UNHANDLED_EXCEPTION);
errmsg_handler_returned = MAKE_STR_COPYING(ERRMSG_HANDLER_RETURNED);
More information about the uim-commit
mailing list