[uim-commit] r313 - trunk/uim

yamaken@freedesktop.org yamaken@freedesktop.org
Mon Jan 17 06:38:52 PST 2005


Author: yamaken
Date: 2005-01-17 06:38:49 -0800 (Mon, 17 Jan 2005)
New Revision: 313

Modified:
   trunk/uim/plugin.c
Log:
* uim/plugin.c
  - (uim_quit_plugin):
    * Fix broken plugin-alist iteration in null list case
    * Simplify


Modified: trunk/uim/plugin.c
===================================================================
--- trunk/uim/plugin.c	2005-01-17 12:58:07 UTC (rev 312)
+++ trunk/uim/plugin.c	2005-01-17 14:38:49 UTC (rev 313)
@@ -211,19 +211,14 @@
 {
 #ifdef UIM_SCM_NESTED_EVAL
   uim_lisp stack_start;
-  uim_lisp list_car, list_cdr;
-  uim_lisp alist;
+  uim_lisp alist, rest, entry, name;
 
   uim_scm_gc_protect_stack(&stack_start);
   alist = uim_scm_eval_c_string("plugin-alist");
-  for(list_car = uim_scm_car(alist), list_cdr = uim_scm_cdr(alist);
-      list_car != uim_scm_f();
-      list_car = uim_scm_car(list_cdr), list_cdr = uim_scm_cdr(list_cdr))
-  {
-    uim_lisp name;
+  for(rest = alist; !uim_scm_nullp(rest); rest = uim_scm_cdr(rest)) {
+    entry = uim_scm_car(rest);
+    name = uim_scm_car(entry);
 
-    name = uim_scm_car(list_car);
-
     plugin_unload(name);
   }
   uim_scm_gc_unprotect_stack(&stack_start);



More information about the Uim-commit mailing list