Index: lily/lily-guile.cc |
diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc |
index ff3f7064bf62d4666d8cc4c8193ea6b2cc8b33af..aecc658ebb263ed1f0fa15f6ec7164f2e4cd9eea 100644 |
--- a/lily/lily-guile.cc |
+++ b/lily/lily-guile.cc |
@@ -178,7 +178,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; |
@@ -226,7 +226,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> |
@@ -321,19 +322,19 @@ ly_scm2offsets (SCM s) |
ALIST |
*/ |
+// This one is used nowhere. |
dak
2011/10/23 21:23:11
If it is used nowhere, it should be removed. It i
|
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)) |
dak
2011/10/23 21:23:11
This returns false even if both alists are empty.
|
+ 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; |
dak
2011/10/23 21:23:11
This returns true if every pair in list a is also
|