From: Han-Wen Nienhuys Date: Wed, 17 Jan 2007 00:54:15 +0000 (+0100) Subject: More checks for objects that should not live outside parser. X-Git-Tag: release/2.11.12-1~12 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7c2707a0e0758fd54ef9e44afbdf37afd07e587b;p=lilypond.git More checks for objects that should not live outside parser. --- diff --git a/lily/include/smobs.hh b/lily/include/smobs.hh index a8f3ac5164..5bd403bce4 100644 --- a/lily/include/smobs.hh +++ b/lily/include/smobs.hh @@ -142,12 +142,16 @@ void unprotect_smob (SCM smob, SCM *prot_cons); extern bool parsed_objects_should_be_dead; +#ifndef NDEDUG #define ASSERT_LIVE_IS_ALLOWED() \ static bool passed_here_once;\ if (parsed_objects_should_be_dead && !passed_here_once) { \ - programming_error (string ("Parsed object should be dead: ") + __PRETTY_FUNCTION__ ); \ + ::programming_error (string ("Parsed object should be dead: ") + __PRETTY_FUNCTION__ ); \ passed_here_once = true;\ } +#else +#define ASSERT_LIVE_IS_ALLOWED() +#endif #endif /* SMOBS_HH */ diff --git a/lily/skyline.cc b/lily/skyline.cc index 744cceb4c3..b729e5312b 100644 --- a/lily/skyline.cc +++ b/lily/skyline.cc @@ -651,6 +651,7 @@ IMPLEMENT_DEFAULT_EQUAL_P (Skyline_pair); SCM Skyline::mark_smob (SCM) { + ASSERT_LIVE_IS_ALLOWED(); return SCM_EOL; }