Am Wednesday, 17. August 2011, 13:53:40 schrieb Carl Sorensen:
> \On 8/16/11 10:25 PM, "Dan Eble" <d...@faithful.be> wrote:
> > Is there a reason that these variables in lily/profile.cc don't need to
> > be initialized?  I don't have experience with guile, but it looks
> > dangerous.
> > 
> > SCM context_property_lookup_table;
> > SCM grob_property_lookup_table;
> > SCM prob_property_lookup_table;
> 
> I guess the code in this section relies on the fact that the compiler will
> initialize the unitialized value to zero.   Do you believe that is a
> problem?

Note that this is also the assumption on the !cached, even if changed to use 
SCM_UNPACK:

SCM cached;
if (!SCM_UNPACK (cached)) ...

where SCM_UNPACK is defined in /usr/include/libguile/tags.h to be either
   #define SCM_UNPACK(x) (x)
or
   #define SCM_UNPACK(x) ((x).n.n)

In both cases, the check is whether an uninitialized variable is 0...

Cheers,
Reinhold

-- 
------------------------------------------------------------------
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

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

Reply via email to