|
Replace C++ (in)equality checks with proper SCM syntax
This commit replaces the most straightforward situations
where two SCM objects are compared. Here are the basic
replacements I used:
x == SCM_BOOL_F ---> scm_is_false (x)
x == SCM_BOOL_T ---> to_boolean (x)
(I’d rather use something more straightforward such as
scm_is_true (x), but accordingly to the CG this is
The LilyPond Way®.)
x == (SCM y) ---> scm_is_eq (x, y)
(often used with ly_symbol2scm)
I’m also adding some functions that Guile v1 does not provide:
x == SCM_EOL ---> ly_is_eol (x)
x == SCM_UNDEFINED ---> ly_is_undefined (x)
(scm_exact_p (x)) == SCM_BOOL_T ----> ly_is_exact (x)
Finally, I replaced (!cached) with (!SCM_UNPACK (cached))
in lily-guile-macros.hh, as has been suggested once by David.
Please note that this commit does not handle some situations
I’m less comfortable with (namely those involving scm_c_memq,
scm_assq or scm_hashq_get_handle), and some scm_*_p checks
for which there isn’t a ly_is_* replacement yet (to wit,
scm_hash_table_p, scm_promise_p, and scm_variable_bound_p).
Those should be dealt with later (preferably with help from
more experienced people than yours truly).
Total comments: 13
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+526 lines, -508 lines) |
Patch |
|
M |
lily/accidental-engraver.cc
|
View
|
1
2
3
4
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/accidental-placement.cc
|
View
|
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/align-interface.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/ambitus-engraver.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/auto-beam-engraver.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+6 lines, -7 lines |
0 comments
|
Download
|
|
M |
lily/axis-group-interface.cc
|
View
|
|
2 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
lily/bar-engraver.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/bar-number-engraver.cc
|
View
|
1
2
3
4
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/beam.cc
|
View
|
1
2
3
4
5
6
7
|
5 chunks |
+7 lines, -6 lines |
0 comments
|
Download
|
|
M |
lily/beam-engraver.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/break-align-engraver.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/break-alignment-interface.cc
|
View
|
2
3
4
5
6
7
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
lily/break-substitution.cc
|
View
|
1
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/chord-name-engraver.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/clef-engraver.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
lily/constrained-breaking.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/context.cc
|
View
|
1
2
3
4
5
6
7
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
lily/context-def.cc
|
View
|
1
2
3
4
|
5 chunks |
+19 lines, -19 lines |
0 comments
|
Download
|
|
M |
lily/context-mod-scheme.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/context-property.cc
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
lily/context-scheme.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/cue-clef-engraver.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/directional-element-interface.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/dispatcher.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/dot-column.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/double-percent-repeat-engraver.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/drum-note-engraver.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/drum-note-performer.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/duration-scheme.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/dynamic-engraver.cc
|
View
|
1
|
4 chunks |
+7 lines, -6 lines |
0 comments
|
Download
|
|
M |
lily/engraver.cc
|
View
|
1
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
lily/engraver-group.cc
|
View
|
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/figured-bass-engraver.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/font-interface.cc
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/font-select.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/general-scheme.cc
|
View
|
1
2
3
4
5
6
|
7 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
lily/glissando-engraver.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/grob.cc
|
View
|
1
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
lily/grob-interface.cc
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/grob-property.cc
|
View
|
1
2
3
4
5
6
7
|
7 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
lily/grob-scheme.cc
|
View
|
1
|
4 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
lily/include/lily-guile.hh
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/include/lily-guile-macros.hh
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/instrument-name-engraver.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/key-engraver.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/lexer.ll
|
View
|
1
2
3
4
5
6
7
|
15 chunks |
+19 lines, -19 lines |
0 comments
|
Download
|
|
M |
lily/ligature-engraver.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/lily-guile.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
lily/lily-lexer.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/lily-parser.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/lily-parser-scheme.cc
|
View
|
1
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/line-interface.cc
|
View
|
|
1 chunk |
+6 lines, -5 lines |
0 comments
|
Download
|
|
M |
lily/line-spanner.cc
|
View
|
2
3
4
5
6
7
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/ly-module.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/mark-engraver.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/measure-grouping-spanner.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/mensural-ligature.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/metronome-engraver.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
lily/midi-item.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/module-scheme.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/multi-measure-rest.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/multi-measure-rest-engraver.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/music.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
lily/new-fingering-engraver.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
lily/note-collision.cc
|
View
|
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/open-type-font.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/output-def.cc
|
View
|
1
|
5 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
|
M |
lily/output-def-scheme.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/page-breaking.cc
|
View
|
1
|
5 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
lily/page-layout-problem.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/page-spacing.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
lily/page-turn-engraver.cc
|
View
|
1
2
3
|
3 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
|
M |
lily/page-turn-page-breaking.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
lily/pango-font.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/pango-select.cc
|
View
|
|
3 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
lily/paper-book.cc
|
View
|
1
2
3
4
5
6
7
|
9 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
|
M |
lily/paper-column.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/paper-column-engraver.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
lily/paper-def.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/paper-outputter.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/paper-score.cc
|
View
|
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/paper-system.cc
|
View
|
1
2
3
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
lily/parse-scm.cc
|
View
|
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/parser.yy
|
View
|
|
8 chunks |
+16 lines, -16 lines |
0 comments
|
Download
|
|
M |
lily/part-combine-engraver.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/part-combine-iterator.cc
|
View
|
|
1 chunk |
+11 lines, -11 lines |
0 comments
|
Download
|
|
M |
lily/percent-repeat-engraver.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/piano-pedal-engraver.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
lily/pitched-trill-engraver.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
lily/prob.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
lily/prob-scheme.cc
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/profile.cc
|
View
|
2
3
4
5
6
7
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
lily/program-option-scheme.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/quote-iterator.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/repeat-acknowledge-engraver.cc
|
View
|
|
1 chunk |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
lily/score.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/score-performer.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/score-scheme.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/script-engraver.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
lily/script-interface.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/self-alignment-interface.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/simple-closure.cc
|
View
|
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
lily/simple-spacer.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/simple-spacer-scheme.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/skyline.cc
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/slur.cc
|
View
|
|
8 chunks |
+12 lines, -10 lines |
0 comments
|
Download
|
|
M |
lily/slur-configuration.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/slur-scoring.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/smobs.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/spaceable-grob.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/spacing-determine-loose-columns.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
lily/spanner.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/staff-performer.cc
|
View
|
|
5 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
lily/staff-spacing.cc
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
lily/stem.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
lily/stem-tremolo.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/stencil.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/stencil-expression.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
lily/stencil-integral.cc
|
View
|
1
2
3
4
5
6
7
|
16 chunks |
+40 lines, -41 lines |
0 comments
|
Download
|
|
M |
lily/stencil-interpret.cc
|
View
|
|
7 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
|
M |
lily/stencil-scheme.cc
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
lily/stream-event.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
lily/stream-event-scheme.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/system.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/system-start-delimiter.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
lily/system-start-delimiter-engraver.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
lily/tab-note-heads-engraver.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/text-interface.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/tie-formatting-problem.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
lily/tie-specification.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/time-signature-engraver.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/translator-ctors.cc
|
View
|
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/translator-group-ctors.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
lily/ttf.cc
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/tuplet-bracket.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/tuplet-number.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
lily/vaticana-ligature.cc
|
View
|
1
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/vaticana-ligature-engraver.cc
|
View
|
1
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
lily/volta-engraver.cc
|
View
|
2
3
4
5
6
7
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
lily/volta-repeat-iterator.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
Total messages: 16
|