2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2005--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
22 #include "paper-score.hh"
26 const char Grob::type_p_name_[] = "ly:grob?";
31 ASSERT_LIVE_IS_ALLOWED (self_scm ());
33 scm_gc_mark (immutable_property_alist_);
35 /* Do not mark the parents. The pointers in the mutable
36 property list form two tree like structures (one for X
37 relations, one for Y relations). Marking these can be done
38 in limited stack space. If we add the parents, we will jump
39 between X and Y in an erratic manner, leading to much more
40 recursion depth (and core dumps if we link to pthreads). */
43 scm_gc_mark (original ()->self_scm ());
46 scm_gc_mark (object_alist_);
47 scm_gc_mark (interfaces_);
49 return mutable_property_alist_;
53 Grob::print_smob (SCM port, scm_print_state *)
55 scm_puts ("#<Grob ", port);
56 scm_puts ((char *) name ().c_str (), port);
58 /* Do not print properties, that is too much hassle. */
59 scm_puts (" >", port);
64 Grob::derived_mark () const