[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S)
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T. |
Date: |
Thu, 07 May 2015 10:28:42 +0000 |
Comment #7 on issue 4365 by address@hidden: Patch: Add ly_is_smob<T>(S) to
check if S is a smob of type T.
https://code.google.com/p/lilypond/issues/detail?id=4365
I'm currently using LY_ASSERT_DERIVED_SMOB from issue 4376 for issue 4357.
The code now looks like
static void trampoline (SCM target, SCM ev)
{
LY_ASSERT_DERIVED_SMOB (T, target, 1);
(dynamic_cast<T*> (T::unsmob (target))->*callback) (ev);
}
and instead having
static void trampoline (SCM target, SCM ev)
{
LY_ASSERT_DERIVED_SMOB (T, target, 1);
(derived_unsmob<T> (target)->*callback) (ev);
}
would already seem like an improvement in readability. Leaving off
the "derived" is not adding all that much in contrast for this particular
problem, particularly since the compiler will not swallow T::unsmob instead
in the second function line when it is not sufficient.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
- [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/01
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/01
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/02
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/02
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/06
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/06
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/07
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T.,
lilypond <=
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/08
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/08
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/08
- Re: [Lilypond-auto] Issue 4365 in lilypond: Patch: Add ly_is_smob<T>(S) to check if S is a smob of type T., lilypond, 2015/05/12