lilypond-devel
[Top][All Lists]
Advanced

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

Re: Uninitialized SCM variables


From: David Kastrup
Subject: Re: Uninitialized SCM variables
Date: Thu, 18 Aug 2011 11:45:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Dan Eble <address@hidden> writes:

> Backing up… I believe the compiler will initialize the bits in the
> aforementioned variables to zero, but is zero a desirable default for
> SCM variables in general, and these in particular?
>
> It also just sank in that in another thread there was a statement that
> treating a SCM as a boolean is "very wrong".  That would include a
> number of lines in ly_property_lookup_stats and note_property_access
> that use these variables.

I have not looked at the respective code yet (short of time right now)
but the names of those functions suggests that they might be looking at
those variables not as much as Scheme values but rather as internals
related to the operation of the Scheme interpreter.  If that guess is
correct, using SCM_UNPACK would likely better convey the kind of action
here (and allow access as a bit pattern/integer/whatever).

-- 
David Kastrup




reply via email to

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