]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/dispatcher.cc
dispatcher.cc: fix type mismatch error in Dispatcher::print_smob
[lilypond.git] / lily / dispatcher.cc
index 0e3ad8998e842031d02d4a6bc7aca4feac65f247..ad1a624b121917b67fe03bc0944cce96a0325de4 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2005--2011 Erik Sandberg  <mandolaerik@gmail.com>
+  Copyright (C) 2005--2012 Erik Sandberg  <mandolaerik@gmail.com>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -58,7 +58,8 @@ Dispatcher::print_smob (SCM s, SCM p, scm_print_state *)
 {
   Dispatcher *me = (Dispatcher *) SCM_CELL_WORD_1 (s);
   scm_puts ("#<Dispatcher ", p);
-  scm_write (scm_vector_to_list (me->listeners_), p);
+  scm_write (scm_call_1 (ly_lily_module_constant ("hash-table->alist"),
+                        me->listeners_), p);
   scm_puts (">", p);
   return 1;
 }
@@ -77,7 +78,7 @@ Dispatcher::dispatch (SCM sev)
 {
   Stream_event *ev = unsmob_stream_event (sev);
   SCM class_symbol = ev->get_property ("class");
-  if (!scm_symbol_p (class_symbol))
+  if (!scm_is_symbol (class_symbol))
     {
       warning (_ ("Event class should be a symbol"));
       return;
@@ -167,8 +168,8 @@ Dispatcher::dispatch (SCM sev)
 
 #if 0
   /* TODO: Uncomment. */
-    if (!sent)
-      warning (_f ("Junking event: %s", ly_symbol2string (class_symbol).c_str ()));
+  if (!sent)
+    warning (_f ("Junking event: %s", ly_symbol2string (class_symbol).c_str ()));
 #endif
 }