On Mi., 17. Aug. 2011 10:19:33 CEST, David Kastrup <d...@gnu.org> wrote:
> I mean, look at the bad code I dug up.    Pretty early in the list there
> was:
> -    if (mode != SCM_UNDEFINED && scm_string_p (mode))
> +    if (scm_is_string (mode))


Yes, that's code that should really be fixed.


> > If you feel compelled to change large swaths of source code by
> > substituting x == SCM_EOL with scm_is_eq(x, SCM_EOL), then I can't
> > stop you, but to me it just looks like a waste of time.
> 
> That would be scm_is_null (x).    It is not exactly like the code gets
> less readable by that substitution.

Here, I agree with David, too.
If we have someone who wants to work on them and clean up some code, I have no 
objection. It just probably won't fix a problem, but improves readability and 
code style.

The only proble I see with the -D compile switch is the code of ly_symbol2scm 
(which is used several times in almost every file), which does a check "if 
(!cached)" to see if the SCM cache has been initialized. How should this be 
correctly implemented? It is not a check for a scheme value, but builds on the 
guile internals of how a SCM looks when initialized.

BTW, it might be useful to compile with -fno-inline to get warnings from 
inlined functions directly rather than at the spot where they are called.

Cheers,
Reinhold

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to