[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix some warnings about string-delete and string-filter argument order
From: |
thomasmorley65 |
Subject: |
Fix some warnings about string-delete and string-filter argument order (issue 318680043 by address@hidden) |
Date: |
Sun, 19 Mar 2017 10:57:31 -0700 |
Reviewers: ,
Message:
This replaces
333eaf6cee3f1717f91a1a0f70592021daeaad38
from branch
remotes/origin/dev/guile-v2-work
Please review.
Description:
Fix some warnings about string-delete and string-filter argument order
This makes guile2 stop printing some warning messages:
Guile used to use the wrong argument order for string-delete.
This call to string-filter had the arguments in the wrong order.
See SRFI-13 for more details. At some point we will remove this hack.
guile-1.8 will continue working.
Please review this at https://codereview.appspot.com/318680043/
Affected files (+11, -5 lines):
M scm/graphviz.scm
M scm/lily.scm
M scm/lily-library.scm
Index: scm/graphviz.scm
diff --git a/scm/graphviz.scm b/scm/graphviz.scm
index
61fa5b1e1b7c3158f97864068cd8eeb6d6f939fe..657fdb23b3e00e5233c583ad8b31bd19ea4c4c84
100644
--- a/scm/graphviz.scm
+++ b/scm/graphviz.scm
@@ -69,7 +69,9 @@
es)
(for-each (lambda (c)
(format out "subgraph cluster_~a {\nlabel=
\"~a\"\ncolor=blue\n"
- (string-filter (car c) char-alphabetic?)
+ (if (guile-v2)
+ (string-filter char-alphabetic? (car c))
+ (string-filter (car c) char-alphabetic?))
(car c))
(for-each (lambda (n) (format out "~a\n" n)) (cdr c))
(display "}\n" out))
Index: scm/lily-library.scm
diff --git a/scm/lily-library.scm b/scm/lily-library.scm
index
c6f066ca3284918723d1be4b8a859d8801f2c2a8..1b3926af7fc98c88160f46fea01c43cb17b5c6d9
100644
--- a/scm/lily-library.scm
+++ b/scm/lily-library.scm
@@ -778,9 +778,9 @@ as rectangular coordinates @code{(x-length .
y-length)}."
(define-public (remove-whitespace strg)
"Remove characters satisfying @code{char-whitespace?} from string
@var{strg}"
- (string-delete
- strg
- char-whitespace?))
+ (if (guile-v2)
+ (string-delete char-whitespace? strg)
+ (string-delete strg char-whitespace?))
(define-public (string-encode-integer i)
(cond
Index: scm/lily.scm
diff --git a/scm/lily.scm b/scm/lily.scm
index
d4553eec19fe74103f772abcf001a7fe7225cf54..4b3c9c7e1c4cad55c64a53fe611d1effcf692612
100644
--- a/scm/lily.scm
+++ b/scm/lily.scm
@@ -963,7 +963,11 @@ PIDs or the number of the process."
(remove string-null?
(append-map
(lambda (f)
- (string-split (string-delete (ly:gulp-file f) #\cr)
#\nl))
+ (string-split
+ (if (guile-v2)
+ (string-delete #\cr (ly:gulp-file f))
+ (string-delete (ly:gulp-file f) #\cr))
+ #\nl))
files))))
(if (and (number? (ly:get-option 'job-count))
(>= (length files) (ly:get-option 'job-count)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fix some warnings about string-delete and string-filter argument order (issue 318680043 by address@hidden),
thomasmorley65 <=