[uim-commit] r2189 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Nov 20 08:11:11 PST 2005
Author: yamaken
Date: 2005-11-20 08:11:06 -0800 (Sun, 20 Nov 2005)
New Revision: 2189
Modified:
branches/r5rs/sigscheme/storage-gc.c
Log:
* sigscheme/storage-gc.c
- (SigScm_GC_Unprotect): Fix infinite loop. This make
test-{string,char}.scm working (!= passed)
Modified: branches/r5rs/sigscheme/storage-gc.c
===================================================================
--- branches/r5rs/sigscheme/storage-gc.c 2005-11-20 15:43:53 UTC (rev 2188)
+++ branches/r5rs/sigscheme/storage-gc.c 2005-11-20 16:11:06 UTC (rev 2189)
@@ -212,15 +212,16 @@
void SigScm_GC_Unprotect(ScmObj *var)
{
- gc_protected_var **item = &protected_var_list;
- gc_protected_var *next = NULL;
- while (*item) {
- if ((*item)->var == var) {
- next = (*item)->next_var;
- free(*item);
- *item = next;
+ gc_protected_var *item, **prev_next;
+
+ prev_next = &protected_var_list;
+ for (item = protected_var_list; item; item = item->next_var) {
+ if (item->var == var) {
+ *prev_next = item->next_var;
+ free(item);
break;
}
+ prev_next = &item->next_var;
}
}
More information about the uim-commit
mailing list