* Fixed a bug in array-set! plus some minor cleanup.
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Sat, 30 Jun 2001 19:56:57 +0000 (19:56 +0000)
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Sat, 30 Jun 2001 19:56:57 +0000 (19:56 +0000)
libguile/ChangeLog
libguile/unif.c

index 4fb5e43..001d249 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-30  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * unif.c (scm_array_set_x):  The variable args does not
+       necessarily have to be a list.  Further, got rid of a redundant
+       SCM_NIMP test.
+
 2001-06-30  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
        * list.c (SCM_I_CONS):  Make sure the cell type is initialized
index 6feb7e6..ac22953 100644 (file)
@@ -1267,7 +1267,6 @@ SCM_DEFINE (scm_array_set_x, "array-set!", 2, 0, 1,
 {
   long pos = 0;
 
-  SCM_VALIDATE_REST_ARGUMENT (args);
   SCM_ASRTGO (SCM_NIMP (v), badarg1);
   if (SCM_ARRAYP (v))
     {
@@ -1277,10 +1276,9 @@ SCM_DEFINE (scm_array_set_x, "array-set!", 2, 0, 1,
   else
     {
       unsigned long int length;
-      if (SCM_NIMP (args))
+      if (SCM_CONSP (args))
        {
-         SCM_ASSERT (SCM_CONSP(args) && SCM_INUMP (SCM_CAR (args)), args,
-                SCM_ARG3, FUNC_NAME);
+         SCM_ASSERT (SCM_INUMP (SCM_CAR (args)), args, SCM_ARG3, FUNC_NAME);
          SCM_ASRTGO (SCM_NULLP (SCM_CDR (args)), wna);
          pos = SCM_INUM (SCM_CAR (args));
        }