]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-guile.cc
Updating lily-guile.cc.
[lilypond.git] / lily / lily-guile.cc
index 040ec45dc6a9ff5ae034a0ebd1be401118890730..710fe151263ccb20f0efcfa80c796b1d9e333332 100644 (file)
@@ -183,7 +183,7 @@ ly_scm_hash (SCM s)
 bool
 is_axis (SCM s)
 {
-  if (scm_is_number (s))
+  if (scm_is_integer (s))
     {
       int i = scm_to_int (s);
       return i == 0 || i == 1;
@@ -231,7 +231,8 @@ is_direction (SCM s)
 Interval
 ly_scm2interval (SCM p)
 {
-  return Interval (scm_to_double (scm_car (p)), scm_to_double (scm_cdr (p)));
+  return Interval (scm_to_double (scm_car (p)),
+                   scm_to_double (scm_cdr (p)));
 }
 
 Drul_array<Real>
@@ -326,19 +327,19 @@ ly_scm2offsets (SCM s)
   ALIST
 */
 
+// This one is used nowhere.
 bool
-alist_equal_p (SCM a, SCM b)
+ly_is_alist_equal (SCM a, SCM b)
 {
-  for (SCM s = a;
-       scm_is_pair (s); s = scm_cdr (s))
+  if (!scm_is_pair (a) || !scm_is_pair (b))
+    return false;
+  for (SCM s = a; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM key = scm_caar (s);
       SCM val = scm_cdar (s);
       SCM l = scm_assoc (key, b);
 
-      if (l == SCM_BOOL_F
-          || !ly_is_equal (scm_cdr (l), val))
-
+      if (scm_is_false (l) || !ly_is_equal (scm_cdr (l), val))
         return false;
     }
   return true;