The case of no args was also not caught (passed through to the 2o
func).  I made this change,

        * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
        arguments or 3 or more arguments.  Previously 0 called proc with
        SCM_UNDEFINED, and 3 or more silently used just the first 2.

--- eval.c.~1.405.2.5.~ 2006-07-21 10:22:22.000000000 +1000
+++ eval.c      2006-10-02 12:18:26.000000000 +1000
@@ -4849,7 +4849,16 @@
   switch (SCM_TYP7 (proc))
     {
     case scm_tc7_subr_2o:
-      args = scm_is_null (args) ? SCM_UNDEFINED : SCM_CAR (args);
+      if (SCM_UNBNDP (arg1))
+       scm_wrong_num_args (proc);
+      if (scm_is_null (args))
+        args = SCM_UNDEFINED;
+      else
+        {
+          if (! scm_is_null (SCM_CDR (args)))
+            scm_wrong_num_args (proc);
+          args = SCM_CAR (args);
+        }
       RETURN (SCM_SUBRF (proc) (arg1, args));
     case scm_tc7_subr_2:
       if (scm_is_null (args) || !scm_is_null (SCM_CDR (args)))
_______________________________________________
Bug-guile mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-guile

Reply via email to