From: Han-Wen Nienhuys Date: Tue, 3 Oct 2006 13:00:58 +0000 (+0000) Subject: add assert to X-Git-Tag: release/2.10.0-2~251 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1844ca06fd3db1872fb19015228913c6fddf07e5;p=lilypond.git add assert to scm_or_str2symbol(SCM). --- diff --git a/ChangeLog b/ChangeLog index 98554552f6..2a66fbae99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-10-03 Han-Wen Nienhuys + * lily/include/lily-guile-macros.hh: add assert to + scm_or_str2symbol(SCM). + * VERSION (PATCH_LEVEL): bump version. * lily/spacing-spanner.cc (musical_column_spacing): handle diff --git a/lily/include/lily-guile-macros.hh b/lily/include/lily-guile-macros.hh index 3f72caddc4..87ceb88a7c 100644 --- a/lily/include/lily-guile-macros.hh +++ b/lily/include/lily-guile-macros.hh @@ -36,7 +36,10 @@ inline SCM scm_or_str2symbol (char const *c) { return scm_str2symbol (c); } inline SCM -scm_or_str2symbol (SCM s) { return s; } +scm_or_str2symbol (SCM s) { + assert (scm_is_symbol (s)); + return s; +} /* Using this trick we cache the value of scm_str2symbol ("fooo") where "fooo" is a constant string. This is done at the cost of one static