[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Likely a good frog project for someone with C knowledge
From: |
David Kastrup |
Subject: |
Re: Likely a good frog project for someone with C knowledge |
Date: |
Wed, 17 Aug 2011 11:39:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Reinhold Kainhofer <address@hidden> writes:
> On Mi., 17. Aug. 2011 10:19:33 CEST, David Kastrup <address@hidden> 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.
I already wrote that.
if (!SCM_UNPACK (cached))
We already use SCM_UNPACK to access raw content when creating smobs (and
it is both the only and the canonical way to do this).
--
David Kastrup
- Re: Likely a good frog project for someone with C knowledge, (continued)
- Re: Likely a good frog project for someone with C knowledge, Han-Wen Nienhuys, 2011/08/16
- Re: Likely a good frog project for someone with C knowledge, David Kastrup, 2011/08/16
- Re: Likely a good frog project for someone with C knowledge, Han-Wen Nienhuys, 2011/08/16
- Re: Likely a good frog project for someone with C knowledge, Werner LEMBERG, 2011/08/16
- Re: Likely a good frog project for someone with C knowledge, Graham Percival, 2011/08/17
- Re: Likely a good frog project for someone with C knowledge, Trevor Daniels, 2011/08/17
- Re: Likely a good frog project for someone with C knowledge, Ian Hulin, 2011/08/17
- Re: Likely a good frog project for someone with C knowledge, David Kastrup, 2011/08/17
- Re: Likely a good frog project for someone with C knowledge, Reinhold Kainhofer, 2011/08/17
- Re: Likely a good frog project for someone with C knowledge,
David Kastrup <=
- Re: Likely a good frog project for someone with C knowledge, David Kastrup, 2011/08/17
- Re: Likely a good frog project for someone with C knowledge, Han-Wen Nienhuys, 2011/08/17
- Re: Likely a good frog project for someone with C knowledge, David Kastrup, 2011/08/17
- Re: Likely a good frog project for someone with C knowledge, Han-Wen Nienhuys, 2011/08/17
- Re: Likely a good frog project for someone with C knowledge, David Kastrup, 2011/08/18
- Re: Likely a good frog project for someone with C knowledge, Ian Hulin, 2011/08/18
Re: Likely a good frog project for someone with C knowledge, David Kastrup, 2011/08/16