X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fscheme-listener.cc;h=9df6960bdf0e2af166ba7e764b28874caf20045b;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=80c43dfbc023250543eb978af0811d8fb154ced0;hpb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;p=lilypond.git diff --git a/lily/scheme-listener.cc b/lily/scheme-listener.cc index 80c43dfbc0..9df6960bdf 100644 --- a/lily/scheme-listener.cc +++ b/lily/scheme-listener.cc @@ -1,9 +1,20 @@ /* - scheme-listener.cc -- Implement Scheme_listener + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2006--2015 Erik Sandberg - (c) 2006--2008 Erik Sandberg + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "scheme-listener.hh" @@ -15,30 +26,25 @@ Scheme_listener::call (SCM ev) scm_call_1 (callback_, ev); } -IMPLEMENT_SMOBS (Scheme_listener); -IMPLEMENT_DEFAULT_EQUAL_P (Scheme_listener); Scheme_listener::Scheme_listener (SCM c) { callback_ = SCM_EOL; - self_scm_ = SCM_EOL; smobify_self (); - callback_ = c; + callback_ = c; } SCM -Scheme_listener::mark_smob (SCM obj) +Scheme_listener::mark_smob () { - Scheme_listener *me = (Scheme_listener *) SCM_CELL_WORD_1 (obj); - return me->callback_; + return callback_; } int -Scheme_listener::print_smob (SCM obj, SCM p, scm_print_state*) +Scheme_listener::print_smob (SCM p, scm_print_state *) { - Scheme_listener *me = (Scheme_listener *) SCM_CELL_WORD_1 (obj); scm_puts ("#callback_, p); + scm_write (callback_, p); scm_puts (">", p); return 1; }