lilypond-auto
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lilypond-auto] [LilyIssues-auto] [testlilyissues:issues] Ticket 4342 di


From: Auto mailings of changes to Lily Issues
Subject: [Lilypond-auto] [LilyIssues-auto] [testlilyissues:issues] Ticket 4342 discussion
Date: Tue, 07 Feb 2017 17:03:07 +0000

I've marked this as "Duplicate" since I folded the contents of the last patch into various other issues (such as issue 5052) and converted a number of TODO comments into appropriate issues as well. As it stands, I think the last patch should more or less completely be turned into code or code proposals.


[issues:#4342] Patch: Replace C++ (in)equality checks with proper SCM syntax

Status: Duplicate
Created: Tue Apr 07, 2015 06:15 AM UTC by Anonymous
Last Updated: Sat Oct 31, 2015 10:23 PM UTC
Owner: David Kastrup

Originally created by: *anonymous

Originally created by: v.villenave
Originally owned by: v.villenave

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


Sent from sourceforge.net because address@hidden is subscribed to https://sourceforge.net/p/testlilyissues/issues/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/testlilyissues/admin/issues/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Testlilyissues-auto mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/testlilyissues-auto

reply via email to

[Prev in Thread] Current Thread [Next in Thread]