[uim-commit] r2749 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Jan 3 00:45:50 PST 2006
Author: yamaken
Date: 2006-01-03 00:45:47 -0800 (Tue, 03 Jan 2006)
New Revision: 2749
Modified:
branches/r5rs/sigscheme/sigscheme.c
Log:
* sigscheme/sigscheme.c
- (scm_use): Reform as GC-safe wrapper to scm_use_internal()
- (scm_use_internal): New static function
Modified: branches/r5rs/sigscheme/sigscheme.c
===================================================================
--- branches/r5rs/sigscheme/sigscheme.c 2006-01-03 08:37:06 UTC (rev 2748)
+++ branches/r5rs/sigscheme/sigscheme.c 2006-01-03 08:45:47 UTC (rev 2749)
@@ -113,6 +113,7 @@
File Local Function Declarations
=======================================*/
static void scm_initialize_internal(void);
+static int scm_use_internal(const char *feature);
static int scm_register_func(const char *name, ScmFuncType func, enum ScmFuncTypeCode type);
static ScmObj scm_eval_c_string_internal(const char *exp);
@@ -219,6 +220,27 @@
int
scm_use(const char *feature)
{
+ int ok;
+#if !SCM_GCC4_READY_GC
+ ScmObj stack_start;
+#endif
+
+#if SCM_GCC4_READY_GC
+ SCM_GC_PROTECTED_CALL(ok, int, scm_use_internal, (feature));
+#else
+ scm_gc_protect_stack(&stack_start);
+
+ ok = scm_use_internal(feature);
+
+ scm_gc_unprotect_stack(&stack_start);
+#endif
+
+ return ok;
+}
+
+static int
+scm_use_internal(const char *feature)
+{
ScmObj ok;
SCM_ASSERT(feature);
More information about the uim-commit
mailing list