]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/listener.cc
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond into...
[lilypond.git] / lily / listener.cc
index edc96bdf1c84aed5a51c69b87ae4914a125ebe77..477733dfe2e057a9422bb405c62c9af98332aec6 100644 (file)
 #include "ly-smobs.icc"
 #include "warn.hh"
 
+Listener::Listener ()
+{
+  target_ = 0;
+  type_ = 0;
+}
+
 Listener::Listener (const void *target, Listener_function_table *type)
 {
   target_ = (void *)target;
@@ -30,12 +36,13 @@ SCM
 Listener::mark_smob (SCM sm)
 {
   Listener *me = (Listener *) SCM_CELL_WORD_1 (sm);
-  (me->type_->mark_callback) (me->target_);
+  if (me->type_)
+    (me->type_->mark_callback) (me->target_);
   return SCM_EOL;
 }
 
 int
-Listener::print_smob (SCM s, SCM p, scm_print_state*)
+Listener::print_smob (SCM, SCM p, scm_print_state*)
 {
   scm_puts ("#<Listener>", p);
   return 1;
@@ -51,4 +58,4 @@ Listener::equal_p (SCM a, SCM b)
 }
 
 IMPLEMENT_SIMPLE_SMOBS (Listener);
-IMPLEMENT_TYPE_P (Listener, "listener");
+IMPLEMENT_TYPE_P (Listener, "ly:listener?");