guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SCM_CALL_N


From: Keisuke Nishida
Subject: SCM_CALL_N
Date: Fri, 22 Jun 2001 19:04:05 +0900
User-agent: Wanderlust/2.4.1 (Stand By Me) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.0.103 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

Hello,

The patch attached below implements four macros, SCM_CALL_0, SCM_CALL_1,
SCM_CALL_2, and SCM_CALL_3, as follows:

#define SCM_CALL_0(proc)        scm_apply (proc, SCM_EOL, SCM_EOL)
#define SCM_CALL_1(proc,a1)     scm_apply (proc, a1, scm_listofnull)
#define SCM_CALL_2(proc,a1,a2)  scm_apply (proc, a1, scm_cons (a2, 
scm_listofnull))
#define SCM_CALL_3(proc,a1,a2,a3) scm_apply (proc, a1, scm_cons2 (a2, a3, 
scm_listofnull))

Is this a good patch?  Can I apply it?

Best regards,
Keisuke Nishida


Index: async.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/async.c,v
retrieving revision 1.57
diff -u -u -r1.57 async.c
--- async.c     2001/06/14 19:50:43     1.57
+++ async.c     2001/06/22 09:59:05
@@ -363,7 +363,7 @@
       if (ASYNC_GOT_IT (a))
        {
          SET_ASYNC_GOT_IT (a, 0);
-         scm_apply (ASYNC_THUNK (a), SCM_EOL, SCM_EOL);
+         SCM_CALL_0 (ASYNC_THUNK (a));
        }
       scm_mask_ints = 0;
       list_of_a = SCM_CDR (list_of_a);
Index: coop-threads.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/coop-threads.c,v
retrieving revision 1.30
diff -u -u -r1.30 coop-threads.c
--- coop-threads.c      2001/06/14 19:50:43     1.30
+++ coop-threads.c      2001/06/22 09:59:06
@@ -180,14 +180,12 @@
   SCM handler;
 } scheme_launch_data;
 
-extern SCM scm_apply (SCM, SCM, SCM);
-
 static SCM
 scheme_body_bootstrip (scheme_launch_data* data)
 {
   /* First save the new root continuation */
   data->rootcont = scm_root->rootcont;
-  return scm_apply (data->body, SCM_EOL, SCM_EOL);
+  return SCM_CALL_0 (data->body);
 }
 
 static SCM
Index: debug.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/debug.c,v
retrieving revision 1.91
diff -u -u -r1.91 debug.c
--- debug.c     2001/06/14 19:50:43     1.91
+++ debug.c     2001/06/22 09:59:06
@@ -120,7 +120,7 @@
 with_traps_inner (void *data)
 {
   SCM thunk = SCM_PACK (data);
-  return scm_apply (thunk, SCM_EOL, SCM_EOL);
+  return SCM_CALL_0 (thunk);
 }
 
 SCM_DEFINE (scm_with_traps, "with-traps", 1, 0, 0, 
Index: dynwind.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/dynwind.c,v
retrieving revision 1.40
diff -u -u -r1.40 dynwind.c
--- dynwind.c   2001/06/14 19:50:43     1.40
+++ dynwind.c   2001/06/22 09:59:06
@@ -125,11 +125,11 @@
   SCM_ASSERT (SCM_NFALSEP (scm_thunk_p (out_guard)),
              out_guard,
              SCM_ARG3, FUNC_NAME);
-  scm_apply (in_guard, SCM_EOL, SCM_EOL);
+  SCM_CALL_0 (in_guard);
   scm_dynwinds = scm_acons (in_guard, out_guard, scm_dynwinds);
-  ans = scm_apply (thunk, SCM_EOL, SCM_EOL);
+  ans = SCM_CALL_0 (thunk);
   scm_dynwinds = SCM_CDR (scm_dynwinds);
-  scm_apply (out_guard, SCM_EOL, SCM_EOL);
+  SCM_CALL_0 (out_guard);
   return ans;
 }
 #undef FUNC_NAME
@@ -231,7 +231,7 @@
              else if (SCM_GUARDSP (wind_key))
                SCM_BEFORE_GUARD (wind_key) (SCM_GUARD_DATA (wind_key));
              else if (SCM_TYP3 (wind_key) == scm_tc3_closure)
-               scm_apply (wind_key, SCM_EOL, SCM_EOL);
+               SCM_CALL_0 (wind_key);
            }
        }
       scm_dynwinds = to;
@@ -263,7 +263,7 @@
              else if (SCM_GUARDSP (wind_key))
                SCM_AFTER_GUARD (wind_key) (SCM_GUARD_DATA (wind_key));
              else if (SCM_TYP3 (wind_key) == scm_tc3_closure)
-               scm_apply (from, SCM_EOL, SCM_EOL);
+               SCM_CALL_0 (from);
            }
        }
       delta--;
Index: eval.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/eval.c,v
retrieving revision 1.230
diff -u -u -r1.230 eval.c
--- eval.c      2001/06/14 20:14:09     1.230
+++ eval.c      2001/06/22 09:59:07
@@ -1246,7 +1246,7 @@
     return x;
 
   SCM_SETCAR (x, orig_sym);  /* Undo memoizing effect of lookupcar */
-  res = scm_apply (SCM_MACRO_CODE (proc), x, scm_cons (env, scm_listofnull));
+  res = SCM_CALL_2 (SCM_MACRO_CODE (proc), x, env);
   
   if (scm_ilength (res) <= 0)
     res = scm_cons2 (SCM_IM_BEGIN, res, SCM_EOL);
@@ -3696,8 +3696,7 @@
     {
       while (SCM_NIMP (arg1))
        {
-         *pres = scm_cons (scm_apply (proc, SCM_CAR (arg1), scm_listofnull),
-                           SCM_EOL);
+         *pres = scm_cons (SCM_CALL_1 (proc, SCM_CAR (arg1)), SCM_EOL);
          pres = SCM_CDRLOC (*pres);
          arg1 = SCM_CDR (arg1);
        }
@@ -3741,7 +3740,7 @@
     {
       while SCM_NIMP (arg1)
        {
-         scm_apply (proc, SCM_CAR (arg1), scm_listofnull);
+         SCM_CALL_1 (proc, SCM_CAR (arg1));
          arg1 = SCM_CDR (arg1);
        }
       return SCM_UNSPECIFIED;
@@ -3812,7 +3811,7 @@
   SCM_VALIDATE_SMOB (1, x, promise);
   if (!((1L << 16) & SCM_CELL_WORD_0 (x)))
     {
-      SCM ans = scm_apply (SCM_CELL_OBJECT_1 (x), SCM_EOL, SCM_EOL);
+      SCM ans = SCM_CALL_0 (SCM_CELL_OBJECT_1 (x));
       if (!((1L << 16) & SCM_CELL_WORD_0 (x)))
        {
          SCM_DEFER_INTS;
@@ -3948,7 +3947,7 @@
   SCM env;
   SCM transformer = scm_current_module_transformer ();
   if (SCM_NIMP (transformer))
-    exp = scm_apply (transformer, exp, scm_listofnull);
+    exp = SCM_CALL_1 (transformer, exp);
   env = scm_top_level_env (scm_current_module_lookup_closure ());
   return scm_i_eval_x (exp, env);
 }
@@ -3962,7 +3961,7 @@
   SCM env;
   SCM transformer = scm_current_module_transformer ();
   if (SCM_NIMP (transformer))
-    exp = scm_apply (transformer, exp, scm_listofnull);
+    exp = SCM_CALL_1 (transformer, exp);
   env = scm_top_level_env (scm_current_module_lookup_closure ());
   return scm_i_eval (exp, env);
 }
Index: eval.h
===================================================================
RCS file: /cvs/guile/guile-core/libguile/eval.h,v
retrieving revision 1.58
diff -u -u -r1.58 eval.h
--- eval.h      2001/06/14 19:50:43     1.58
+++ eval.h      2001/06/22 09:59:07
@@ -126,6 +126,15 @@
 #endif /* DEBUG_EXTENSIONS */
 
 
+/* {Procedure calls}
+ */
+
+#define SCM_CALL_0(proc)       scm_apply (proc, SCM_EOL, SCM_EOL)
+#define SCM_CALL_1(proc,a1)    scm_apply (proc, a1, scm_listofnull)
+#define SCM_CALL_2(proc,a1,a2) scm_apply (proc, a1, scm_cons (a2, 
scm_listofnull))
+#define SCM_CALL_3(proc,a1,a2,a3) scm_apply (proc, a1, scm_cons2 (a2, a3, 
scm_listofnull))
+
+
 
 #define SCM_EXTEND_ENV scm_acons
 
Index: fluids.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/fluids.c,v
retrieving revision 1.38
diff -u -u -r1.38 fluids.c
--- fluids.c    2001/06/14 19:50:43     1.38
+++ fluids.c    2001/06/22 09:59:08
@@ -214,7 +214,7 @@
 static SCM
 apply_thunk (void *thunk)
 {
-  return scm_apply (SCM_PACK (thunk), SCM_EOL, SCM_EOL);
+  return SCM_CALL_0 (SCM_PACK (thunk));
 }
 
 SCM_DEFINE (scm_with_fluids, "with-fluids*", 3, 0, 0, 
Index: goops.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/goops.c,v
retrieving revision 1.37
diff -u -u -r1.37 goops.c
--- goops.c     2001/06/14 19:50:43     1.37
+++ goops.c     2001/06/22 09:59:09
@@ -63,6 +63,7 @@
 #include "libguile/ports.h"
 #include "libguile/procprop.h"
 #include "libguile/random.h"
+#include "libguile/root.h"
 #include "libguile/smob.h"
 #include "libguile/strings.h"
 #include "libguile/strports.h"
@@ -2339,9 +2340,7 @@
 
   /* Only define name if doesn't already exist. */
   if (!SCM_GOOPS_UNBOUNDP (name)
-      && SCM_FALSEP (scm_apply (scm_goops_lookup_closure,
-                               SCM_LIST2 (name, SCM_BOOL_F),
-                               SCM_EOL)))
+      && SCM_FALSEP (SCM_CALL_2 (scm_goops_lookup_closure, name, SCM_BOOL_F)))
     DEFVAR (name, class);
   return class;
 }
@@ -2588,9 +2587,7 @@
 SCM
 scm_ensure_accessor (SCM name)
 {
-  SCM gf = scm_apply (SCM_TOP_LEVEL_LOOKUP_CLOSURE,
-                     SCM_LIST2 (name, SCM_BOOL_F),
-                     SCM_EOL);
+  SCM gf = SCM_CALL_2 (SCM_TOP_LEVEL_LOOKUP_CLOSURE, name, SCM_BOOL_F);
   if (!SCM_IS_A_P (gf, scm_class_generic_with_setter))
     {
       gf = scm_make (SCM_LIST3 (scm_class_generic, k_name, name));
Index: hashtab.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/hashtab.c,v
retrieving revision 1.40
diff -u -u -r1.40 hashtab.c
--- hashtab.c   2001/06/14 19:50:43     1.40
+++ hashtab.c   2001/06/22 09:59:09
@@ -48,6 +48,7 @@
 #include "libguile/alist.h"
 #include "libguile/hash.h"
 #include "libguile/eval.h"
+#include "libguile/root.h"
 #include "libguile/vectors.h"
 
 #include "libguile/validate.h"
@@ -380,9 +381,7 @@
 {
   SCM answer;
   SCM_DEFER_INTS;
-  answer = scm_apply (closure->hash,
-                     SCM_LIST2 (obj, scm_ulong2num ((unsigned long)n)),
-                     SCM_EOL);
+  answer = SCM_CALL_2 (closure->hash, obj, scm_ulong2num ((unsigned long) n));
   SCM_ALLOW_INTS;
   return SCM_INUM (answer);
 }
@@ -394,9 +393,7 @@
 {
   SCM answer;
   SCM_DEFER_INTS;
-  answer = scm_apply (closure->assoc,
-                     SCM_LIST2 (obj, alist),
-                     SCM_EOL);
+  answer = SCM_CALL_2 (closure->assoc, obj, alist);
   SCM_ALLOW_INTS;
   return answer;
 }
@@ -409,9 +406,7 @@
 {
   SCM answer;
   SCM_DEFER_INTS;
-  answer = scm_apply (closure->delete,
-                     SCM_LIST2 (obj, alist),
-                     SCM_EOL);
+  answer = SCM_CALL_2 (closure->delete, obj, alist);
   SCM_ALLOW_INTS;
   return answer;
 }
@@ -519,7 +514,7 @@
 static SCM
 fold_proc (void *proc, SCM key, SCM data, SCM value)
 {
-  return scm_apply (SCM_PACK (proc), SCM_LIST3 (key, data, value), SCM_EOL);
+  return SCM_CALL_3 (SCM_PACK (proc), key, data, value);
 }
 
 SCM_DEFINE (scm_hash_fold, "hash-fold", 3, 0, 0, 
Index: load.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/load.c,v
retrieving revision 1.61
diff -u -u -r1.61 load.c
--- load.c      2001/05/26 20:51:20     1.61
+++ load.c      2001/06/22 09:59:09
@@ -119,7 +119,7 @@
                    SCM_EOL);
 
   if (! SCM_FALSEP (hook))
-    scm_apply (hook, SCM_LIST1 (filename), SCM_EOL);
+    SCM_CALL_1 (hook, filename);
 
   { /* scope */
     SCM port, save_port;
Index: modules.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/modules.c,v
retrieving revision 1.29
diff -u -u -r1.29 modules.c
--- modules.c   2001/06/14 19:50:43     1.29
+++ modules.c   2001/06/22 09:59:09
@@ -162,17 +162,15 @@
 SCM
 scm_resolve_module (SCM name)
 {
-  return scm_apply (SCM_VARIABLE_REF (resolve_module_var),
-                   SCM_LIST1 (name), SCM_EOL);
+  return SCM_CALL_1 (SCM_VARIABLE_REF (resolve_module_var), name);
 }
 
 SCM
 scm_c_define_module (const char *name,
                     void (*init)(void *), void *data)
 {
-  SCM module = scm_apply (SCM_VARIABLE_REF (process_define_module_var),
-                         SCM_LIST1 (SCM_LIST1 (convert_module_name (name))),
-                         SCM_EOL);
+  SCM module = SCM_CALL_1 (SCM_VARIABLE_REF (process_define_module_var),
+                          SCM_LIST1 (convert_module_name (name)));
   if (init)
     scm_c_call_with_current_module (module, (SCM (*)(void*))init, data);
   return module;
@@ -181,9 +179,8 @@
 void
 scm_c_use_module (const char *name)
 {
-  scm_apply (SCM_VARIABLE_REF (process_use_modules_var),
-            SCM_LIST1 (SCM_LIST1 (convert_module_name (name))),
-            SCM_EOL);
+  SCM_CALL_1 (SCM_VARIABLE_REF (process_use_modules_var),
+             SCM_LIST1 (convert_module_name (name)));
 }
 
 static SCM module_export_x_var;
@@ -203,10 +200,8 @@
       *tail = scm_cons (scm_str2symbol (n), SCM_EOL);
       tail = SCM_CDRLOC (*tail);
     }
-  scm_apply (SCM_VARIABLE_REF (module_export_x_var),
-            SCM_LIST2 (scm_current_module (),
-                       names),
-            SCM_EOL);
+  SCM_CALL_2 (SCM_VARIABLE_REF (module_export_x_var),
+             scm_current_module (), names);
 }
 
 /* Environments */
@@ -292,9 +287,7 @@
     if (SCM_NFALSEP (binder))
       /* 2. Custom binder */
       {
-       b = scm_apply (binder,
-                      SCM_LIST3 (module, sym, SCM_BOOL_F),
-                      SCM_EOL);
+       b = SCM_CALL_3 (binder, module, sym, SCM_BOOL_F);
        if (SCM_NFALSEP (b))
          return b;
       }
@@ -329,9 +322,8 @@
     {
       if (SCM_EVAL_CLOSURE_INTERFACE_P (eclo))
        return SCM_BOOL_F;
-      return scm_apply (SCM_VARIABLE_REF (module_make_local_var_x_var),
-                       SCM_LIST2 (module, sym),
-                       SCM_EOL);
+      return SCM_CALL_2 (SCM_VARIABLE_REF (module_make_local_var_x_var),
+                        module, sym);
     }
   else
     return module_variable (module, sym);
@@ -423,7 +415,7 @@
          var = scm_eval_closure_lookup (proc, sym, definep);
        }
       else
-       var = scm_apply (proc, sym, scm_cons (definep, scm_listofnull));
+       var = SCM_CALL_2 (proc, sym, definep);
     }
   else
     {
@@ -686,10 +678,9 @@
   scm_c_issue_deprecation_warning ("`scm_make_module' is deprecated. "
                                   "Use `scm_c_define_module instead.");
 
-  return scm_apply (SCM_VARIABLE_REF (make_modules_in_var),
-                   SCM_LIST2 (scm_the_root_module (),
-                              scm_module_full_name (name)),
-                   SCM_EOL);
+  return SCM_CALL_2 (SCM_VARIABLE_REF (make_modules_in_var),
+                    scm_the_root_module (),
+                    scm_module_full_name (name));
 }
 
 SCM
@@ -698,8 +689,7 @@
   scm_c_issue_deprecation_warning ("`scm_ensure_user_module' is deprecated. "
                                   "Use `scm_c_define_module instead.");
 
-  scm_apply (SCM_VARIABLE_REF (beautify_user_module_x_var),
-            SCM_LIST1 (module), SCM_EOL);
+  SCM_CALL_1 (SCM_VARIABLE_REF (beautify_user_module_x_var), module);
   return SCM_UNSPECIFIED;
 }
 
@@ -709,8 +699,7 @@
   scm_c_issue_deprecation_warning ("`scm_load_scheme_module' is deprecated. "
                                   "Use `scm_c_resolve_module instead.");
 
-  return scm_apply (SCM_VARIABLE_REF (try_module_autoload_var),
-                   SCM_LIST1 (name), SCM_EOL);
+  return SCM_CALL_1 (SCM_VARIABLE_REF (try_module_autoload_var), name);
 }
 
 #endif
Index: ports.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/ports.c,v
retrieving revision 1.149
diff -u -u -r1.149 ports.c
--- ports.c     2001/06/14 19:50:43     1.149
+++ ports.c     2001/06/22 09:59:10
@@ -732,7 +732,7 @@
 
   while (ports != SCM_EOL)
     {
-      scm_apply (proc, scm_cons (SCM_CAR (ports), SCM_EOL), SCM_EOL);
+      SCM_CALL_1 (proc, SCM_CAR (ports));
       ports = SCM_CDR (ports);
     }
 
Index: print.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/print.c,v
retrieving revision 1.126
diff -u -u -r1.126 print.c
--- print.c     2001/06/14 19:50:43     1.126
+++ print.c     2001/06/22 09:59:10
@@ -1068,7 +1068,7 @@
   SCM pair = scm_cons (port, pstate->handle);
   SCM_NEWSMOB (pwps, scm_tc16_port_with_ps, SCM_UNPACK (pair));
   pstate->revealed = 1;
-  return scm_apply (proc, exp, scm_cons (pwps, scm_listofnull));
+  return SCM_CALL_2 (proc, exp, pwps);
 }
 
 SCM_DEFINE (scm_port_with_print_state, "port-with-print-state", 2, 0, 0, 
Index: properties.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/properties.c,v
retrieving revision 1.4
diff -u -u -r1.4 properties.c
--- properties.c        2001/03/30 15:03:22     1.4
+++ properties.c        2001/06/22 09:59:10
@@ -100,7 +100,7 @@
     return SCM_BOOL_F;
   else
     {
-      SCM val = scm_apply (SCM_CAR (prop), SCM_LIST2 (prop, obj), SCM_EOL);
+      SCM val = SCM_CALL_2 (SCM_CAR (prop), prop, obj);
       if (SCM_FALSEP (h))
        h = scm_hashq_create_handle_x (scm_properties_whash, obj, SCM_EOL);
       SCM_SETCDR (h, scm_acons (prop, val, SCM_CDR (h)));
Index: ramap.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/ramap.c,v
retrieving revision 1.76
diff -u -u -r1.76 ramap.c
--- ramap.c     2001/06/14 19:50:43     1.76
+++ ramap.c     2001/06/22 09:59:11
@@ -1241,7 +1241,7 @@
   ra0 = SCM_ARRAY_V (ra0);
   if (SCM_NULLP (ras))
     for (; i <= n; i++)
-      scm_array_set_x (ra0, scm_apply (proc, SCM_EOL, SCM_EOL), SCM_MAKINUM (i 
* inc + base));
+      scm_array_set_x (ra0, SCM_CALL_0 (proc), SCM_MAKINUM (i * inc + base));
   else
     {
       SCM ra1 = SCM_CAR (ras);
@@ -1285,7 +1285,7 @@
     default:
     gencase:
  for (; n-- > 0; i0 += inc0, i1 += inc1)
-   scm_array_set_x (ra0, scm_apply (proc, RVREF (ra1, i1, e1), 
scm_listofnull), SCM_MAKINUM (i0));
+   scm_array_set_x (ra0, SCM_CALL_1 (proc, RVREF (ra1, i1, e1)), SCM_MAKINUM 
(i0));
  break;
     case scm_tc7_fvect:
       {
@@ -1635,7 +1635,7 @@
   ra0 = SCM_ARRAY_V (ra0);
   if (SCM_NULLP (ras))
     for (; i <= n; i++, i0 += inc0)
-      scm_apply (proc, scm_cvref (ra0, i0, SCM_UNDEFINED), scm_listofnull);
+      SCM_CALL_1 (proc, scm_cvref (ra0, i0, SCM_UNDEFINED));
   else
     {
       SCM ra1 = SCM_CAR (ras);
@@ -1710,7 +1710,7 @@
       {
        SCM *ve = SCM_VELTS (ra);
        for (i = 0; i < SCM_VECTOR_LENGTH (ra); i++)
-         ve[i] = scm_apply (proc, SCM_MAKINUM (i), scm_listofnull);
+         ve[i] = SCM_CALL_1 (proc, SCM_MAKINUM (i));
        return SCM_UNSPECIFIED;
       }
     case scm_tc7_string:
@@ -1728,7 +1728,7 @@
       {
        unsigned long int length = SCM_INUM (scm_uniform_vector_length (ra));
        for (i = 0; i < length; i++)
-         scm_array_set_x (ra, scm_apply (proc, SCM_MAKINUM (i), 
scm_listofnull),
+         scm_array_set_x (ra, SCM_CALL_1 (proc, SCM_MAKINUM (i)),
                           SCM_MAKINUM (i));
        return SCM_UNSPECIFIED;
       }
@@ -1740,8 +1740,7 @@
        long *vinds = (long *) SCM_VELTS (inds);
        int j, k, kmax = SCM_ARRAY_NDIM (ra) - 1;
        if (kmax < 0)
-         return scm_array_set_x (ra, scm_apply(proc, SCM_EOL, SCM_EOL),
-                                 SCM_EOL);
+         return scm_array_set_x (ra, SCM_CALL_0 (proc), SCM_EOL);
        for (k = 0; k <= kmax; k++)
          vinds[k] = SCM_ARRAY_DIMS (ra)[k].lbnd;
        k = kmax;
Index: scmsigs.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/scmsigs.c,v
retrieving revision 1.58
diff -u -u -r1.58 scmsigs.c
--- scmsigs.c   2001/05/20 00:35:42     1.58
+++ scmsigs.c   2001/06/22 09:59:11
@@ -51,6 +51,7 @@
 
 #include "libguile/async.h"
 #include "libguile/eval.h"
+#include "libguile/root.h"
 #include "libguile/vectors.h"
 
 #include "libguile/validate.h"
@@ -166,9 +167,7 @@
 #ifndef HAVE_SIGACTION
          signal (i, take_signal);
 #endif
-         scm_apply (SCM_VELTS (*signal_handlers)[i],
-                    SCM_LIST1 (SCM_MAKINUM (i)),
-                    SCM_EOL);
+         SCM_CALL_1 (SCM_VELTS (*signal_handlers)[i], SCM_MAKINUM (i));
        }
     }
   return SCM_UNSPECIFIED;
Index: sort.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/sort.c,v
retrieving revision 1.35
diff -u -u -r1.35 sort.c
--- sort.c      2001/05/27 22:00:03     1.35
+++ sort.c      2001/06/22 09:59:12
@@ -86,6 +86,7 @@
 #include "libguile/ramap.h"
 #include "libguile/alist.h"
 #include "libguile/feature.h"
+#include "libguile/root.h"
 #include "libguile/vectors.h"
 
 #include "libguile/validate.h"
@@ -385,10 +386,7 @@
 static int 
 applyless (SCM less, const void *a, const void *b)
 {
-  return SCM_NFALSEP (scm_apply (less,
-                                scm_cons (*(SCM *) a,
-                                          scm_cons (*(SCM *) b, SCM_EOL)),
-                                SCM_EOL));
+  return SCM_NFALSEP (SCM_CALL_2 (less, *(SCM *) a, *(SCM *) b));
 }                              /* applyless */
 
 static cmp_fun_t
Index: strports.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/strports.c,v
retrieving revision 1.79
diff -u -u -r1.79 strports.c
--- strports.c  2001/06/14 19:50:43     1.79
+++ strports.c  2001/06/22 09:59:12
@@ -329,7 +329,7 @@
   if (SCM_UNBNDP (printer))
     scm_write (obj, port);
   else
-    scm_apply (printer, SCM_LIST2 (obj, port), SCM_EOL);
+    SCM_CALL_2 (printer, obj, port);
 
   return scm_strport_to_string (port);
 }
@@ -358,7 +358,7 @@
                     scm_make_string (SCM_INUM0, SCM_UNDEFINED),
                     SCM_OPN | SCM_WRTNG,
                      FUNC_NAME);
-  scm_apply (proc, p, scm_listofnull);
+  SCM_CALL_1 (proc, p);
 
   return scm_strport_to_string (p);
 }
@@ -372,7 +372,7 @@
 #define FUNC_NAME s_scm_call_with_input_string
 {
   SCM p = scm_mkstrport(SCM_INUM0, string, SCM_OPN | SCM_RDNG, FUNC_NAME);
-  return scm_apply (proc, p, scm_listofnull);
+  return SCM_CALL_1 (proc, p);
 }
 #undef FUNC_NAME
 
Index: throw.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/throw.c,v
retrieving revision 1.86
diff -u -u -r1.86 throw.c
--- throw.c     2001/06/14 19:50:43     1.86
+++ throw.c     2001/06/22 09:59:12
@@ -348,7 +348,7 @@
 {
   struct scm_body_thunk_data *c = (struct scm_body_thunk_data *) body_data;
 
-  return scm_apply (c->body_proc, SCM_EOL, SCM_EOL);
+  return SCM_CALL_0 (c->body_proc);
 }
 
 
Index: vports.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/vports.c,v
retrieving revision 1.46
diff -u -u -r1.46 vports.c
--- vports.c    2001/06/14 19:50:43     1.46
+++ vports.c    2001/06/22 09:59:13
@@ -81,8 +81,7 @@
   if (pt->write_pos > pt->write_buf)
     {
       /* write the byte. */
-      scm_apply (SCM_VELTS (stream)[0], SCM_MAKE_CHAR (*pt->write_buf),
-                scm_listofnull);
+      SCM_CALL_1 (SCM_VELTS (stream)[0], SCM_MAKE_CHAR (*pt->write_buf));
       pt->write_pos = pt->write_buf;
   
       /* flush the output.  */
@@ -90,7 +89,7 @@
        SCM f = SCM_VELTS (stream)[2];
 
        if (!SCM_FALSEP (f))
-         scm_apply (f, SCM_EOL, SCM_EOL);
+         SCM_CALL_0 (f);
       }
     }
 }
@@ -100,9 +99,7 @@
 {
   SCM p = SCM_PACK (SCM_STREAM (port));
 
-  scm_apply (SCM_VELTS (p)[1], 
-            scm_cons (scm_makfromstr ((char *) data, size, 0), SCM_EOL),
-            SCM_EOL);
+  SCM_CALL_1 (SCM_VELTS (p)[1], scm_makfromstr ((char *) data, size, 0));
 }
 
 /* calling the flush proc (element 2) is in case old code needs it,
@@ -116,7 +113,7 @@
   SCM p = SCM_PACK (SCM_STREAM (port));
   SCM ans;
 
-  ans = scm_apply (SCM_VELTS (p)[3], SCM_EOL, SCM_EOL); /* get char.  */
+  ans = SCM_CALL_0 (SCM_VELTS (p)[3]); /* get char.  */
   if (SCM_FALSEP (ans) || SCM_EOF_OBJECT_P (ans))
     return EOF;
   SCM_ASSERT (SCM_CHARP (ans), ans, SCM_ARG1, "sf_fill_input");
@@ -138,7 +135,7 @@
   SCM f = SCM_VELTS (p)[4];
   if (SCM_FALSEP (f))
     return 0;
-  f = scm_apply (f, SCM_EOL, SCM_EOL);
+  f = SCM_CALL_0 (f);
   errno = 0;
   return SCM_FALSEP (f) ? EOF : 0;
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]