[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Various clean-ups in stems and beams. (issue 6584045)
From: |
address@hidden |
Subject: |
Re: Various clean-ups in stems and beams. (issue 6584045) |
Date: |
Sat, 3 Nov 2012 19:07:13 +0100 |
On 3 nov. 2012, at 12:26, address@hidden wrote:
> http://codereview.appspot.com/6584045/diff/12001/lily/stem.cc#newcode812
> lily/stem.cc:812: Real beg = robust_scm2double (me->get_pure_property
> ("stem-begin-position", 0, INT_MAX), 0.0);
> Using robust_scm2double does not help when me is 0. This still needs
> LY_ASSERT_TYPE or similar.
>
Hey David,
I finally had a chance to read these over - many thanks!
For LY_ASSERT_TYPE, I agree with you that this should be used all over the
place. Unfortunately, it is not. If you read the code base, you will see that
almost every single callback leaves grobs untested, which would cause segfaults
for null pointers.
I think the best idea would be to open up a separate tracker issue that talks
about this problem. Given how often the first argument of scheme callbacks is
a grob, it may be worth it to create macros MAKE_SCHEME_GROB_CALLBACK,
MAKE_SCHEME_ITEM_CALLBACK, and MAKE_SCHEME_SPANNER_CALLBACK. The macros would
roll in a LY_ASSERT_TYPE, thus avoiding writing it out in every function.
I'll make sure to fix everything in your other comments, but stuff pertaining
to LY_ASSERT_TYPE should wait until we figure out a policy on how this should
be handled across all callbacks. While we wait for that to get sorted out, we
could create a moratorium on pushing any patches that create new callbacks,
although I think that'd be a bit excessive.
Cheers,
MS
- Re: Various clean-ups in stems and beams. (issue 6584045), dak, 2012/11/03
- Re: Various clean-ups in stems and beams. (issue 6584045), dak, 2012/11/03
- Re: Various clean-ups in stems and beams. (issue 6584045), marc, 2012/11/04
- Re: Various clean-ups in stems and beams. (issue 6584045), aleksandr . andreev, 2012/11/04
- Re: Various clean-ups in stems and beams. (issue 6584045), aleksandr . andreev, 2012/11/04
- Re: Various clean-ups in stems and beams. (issue 6584045), aleksandr . andreev, 2012/11/04
- Re: Various clean-ups in stems and beams. (issue 6584045), dak, 2012/11/06