Fix extensibility of 1-argument atan
authorMark H Weaver <mhw@netris.org>
Thu, 10 Feb 2011 19:24:39 +0000 (14:24 -0500)
committerAndy Wingo <wingo@pobox.com>
Sat, 12 Feb 2011 12:00:43 +0000 (13:00 +0100)
* libguile/numbers.c (scm_atan): Call SCM_WTA_DISPATCH_1 instead of
  SCM_WTA_DISPATCH_2 if the second argument is unbound.  Arguably,
  SCM_WTA_DISPATCH_* should handle that case gracefully, but currently
  it doesn't.

libguile/numbers.c

index bd9870f..e4e5140 100644 (file)
@@ -7025,7 +7025,7 @@ SCM_PRIMITIVE_GENERIC (scm_atan, "atan", 1, 1, 0,
                              scm_c_make_rectangular (0, 2));
         }
       else
-        SCM_WTA_DISPATCH_2 (g_scm_atan, z, y, SCM_ARG1, s_scm_atan);
+        SCM_WTA_DISPATCH_1 (g_scm_atan, z, SCM_ARG1, s_scm_atan);
     }
   else if (scm_is_real (z))
     {