Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(436)

Issue 229680043: Redefine LY_ASSERT_SMOB to deal with inherited is_smob (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 12 months ago by dak
Modified:
8 years, 10 months ago
Reviewers:
Dan Eble
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Redefine LY_ASSERT_SMOB to deal with inherited is_smob When LY_ASSERT_SMOB is called with a class that is actually derived from some smobified base class providing is_smob and unsmob, the resulting check and error message is inaccurate. This patch uses dynamic_cast in order to sustain sensible behavior. The performance impact for previously working code and type combinations is low since dynamic_cast in this configuration resolves at compile time.

Patch Set 1 #

Patch Set 2 : Be more conservative by defining a separate LY_ASSERT_DERIVED_SMOB #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -1 line) Patch
M lily/include/lily-guile-macros.hh View 1 1 chunk +18 lines, -1 line 0 comments Download
M lily/lily-guile.cc View 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 3
Dan Eble
LGTM
8 years, 12 months ago (2015-05-07 02:05:22 UTC) #1
dak
Be more conservative by defining a separate LY_ASSERT_DERIVED_SMOB
8 years, 12 months ago (2015-05-07 09:56:54 UTC) #2
Dan Eble
8 years, 12 months ago (2015-05-07 12:26:23 UTC) #3
On 2015/05/07 09:56:54, dak wrote:
> Be more conservative by defining a separate LY_ASSERT_DERIVED_SMOB

Still LGTM.  I'll use this when I resume work on
https://code.google.com/p/lilypond/issues/detail?id=4365.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b