lilypond-devel
[Top][All Lists]
Advanced

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

Re: hairpin.cc: consider suicide before drawing stencil; issue 2583 (iss


From: k-ohara5a5a
Subject: Re: hairpin.cc: consider suicide before drawing stencil; issue 2583 (issue 6449126)
Date: Fri, 24 Aug 2012 04:03:30 +0000


http://codereview.appspot.com/6449126/diff/1003/lily/grob-property.cc
File lily/grob-property.cc (right):

http://codereview.appspot.com/6449126/diff/1003/lily/grob-property.cc#newcode254
lily/grob-property.cc:254: *alist = scm_assq_remove_x (*alist, sym);
On 2012/08/23 10:09:18, dak wrote:
However, if the comment above is supposed to make any sense,
namely that the property is assumed
to be set (or cleared) [by the callback]
then the assertion would have to be "assert (value !=
marker)", and the path "value == marker" should never be reached at
all.


That comment made sense when first written in 2005, explaining why we
are reading a property that just set (with the calculation-in-progress
marker).  Its assumption didn't last very long; the next commit ten
hours later added the (buggy) call to scm_assq_remove_x() attempting to
clear that marker, in case the callback forgot.  (In today's code I find
no callbacks clearing their own markers.)  The assert was added two
years after that, largely preventing the scenario described in the
comment from happening in any useful way.

I'll delete the comment.

http://codereview.appspot.com/6449126/



reply via email to

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