]> git.donarmstrong.com Git - lilypond.git/commitdiff
use SCM_ASSERT_TYPE for graphing functions.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 7 Nov 2006 18:08:09 +0000 (19:08 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 7 Nov 2006 18:08:09 +0000 (19:08 +0100)
lily/engraver.cc
lily/grob-property.cc

index f66aff808c044ff0730682f8ab7424ea63c34b78..b61850eb2fe467a15c0295e8178b349ed2b78c52 100644 (file)
@@ -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
 
index 707f4c118aa6953604417bd039614e6cbb85e2de..f1242994d53fb696133cbedfc6e6b2bc1b9336ce 100644 (file)
@@ -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