From 442d763c5b9ed4acccfd9d31e54cf35bfea63325 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 3 Oct 2006 13:00:58 +0000 Subject: [PATCH] add assert to scm_or_str2symbol(SCM). --- ChangeLog | 3 +++ lily/include/lily-guile-macros.hh | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 -- 2.39.2