[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality
From: |
lilypond |
Subject: |
[Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax |
Date: |
Tue, 07 Apr 2015 13:16:45 +0000 |
Status: Started
Owner: v.villenave
Labels: Type-Enhancement Patch-new
New issue 4342 by v.villenave: Patch: Replace C++ (in)equality checks with
proper SCM syntax
https://code.google.com/p/lilypond/issues/detail?id=4342
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).
http://codereview.appspot.com/226840043
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
- [Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax,
lilypond <=
- Re: [Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax, lilypond, 2015/04/07
- Re: [Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax, lilypond, 2015/04/07
- Re: [Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax, lilypond, 2015/04/07
- Re: [Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax, lilypond, 2015/04/08
- Re: [Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax, lilypond, 2015/04/08
- Re: [Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax, lilypond, 2015/04/08
- Re: [Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax, lilypond, 2015/04/08
- Re: [Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax, lilypond, 2015/04/08
- Re: [Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax, lilypond, 2015/04/08
- Re: [Lilypond-auto] Issue 4342 in lilypond: Patch: Replace C++ (in)equality checks with proper SCM syntax, lilypond, 2015/04/08