From: Han-Wen Nienhuys Date: Tue, 7 Nov 2006 18:08:09 +0000 (+0100) Subject: use SCM_ASSERT_TYPE for graphing functions. X-Git-Tag: release/2.10.0-2~31^2~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=60e6486425fd08ee69e3e383ca5183d058bca037;p=lilypond.git use SCM_ASSERT_TYPE for graphing functions. --- diff --git a/lily/engraver.cc b/lily/engraver.cc index f66aff808c..b61850eb2f 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -98,12 +98,12 @@ LY_DEFINE (ly_set_grob_creation_callback, "ly:set-grob-creation-callback", "the grob to be created and the corresponding line number in the " "C++ source file.") { - if (!ly_is_procedure (cb)) - warning (_ ("not setting creation callback: not a procedure")); - else - creation_callback = cb; + SCM_ASSERT_TYPE(ly_is_procedure (cb), cb, SCM_ARG1, __FUNCTION__, + "procedure"); - return SCM_EOL; + creation_callback = cb; + + return SCM_UNSPECIFIED; } #endif diff --git a/lily/grob-property.cc b/lily/grob-property.cc index 707f4c118a..f1242994d5 100644 --- a/lily/grob-property.cc +++ b/lily/grob-property.cc @@ -32,11 +32,12 @@ LY_DEFINE (ly_set_grob_modification_callback, "ly:set-grob-modification-callback "which the modification was requested, the property to be changed and " "the new value for the property.") { - if (!ly_is_procedure (cb)) - warning (_ ("not setting modification callback: not a procedure")); - else - modification_callback = cb; - return SCM_EOL; + + SCM_ASSERT_TYPE(ly_is_procedure (cb), cb, SCM_ARG1, __FUNCTION__, + "procedure"); + + modification_callback = cb; + return SCM_UNSPECIFIED; } #endif