From 1b5f1825a6655583a6209fedd51b98f4865bb2cd Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 20 Jun 2015 18:13:10 +0200 Subject: [PATCH] Issue 4459/1: Mark mark_smob () member functions as const --- lily/all-font-metrics.cc | 2 +- lily/book.cc | 2 +- lily/context-def.cc | 2 +- lily/context-mod.cc | 2 +- lily/context-property.cc | 4 ++-- lily/context.cc | 2 +- lily/dispatcher.cc | 2 +- lily/font-metric.cc | 2 +- lily/grob-array.cc | 2 +- lily/grob-smob.cc | 2 +- lily/include/all-font-metrics.hh | 2 +- lily/include/book.hh | 2 +- lily/include/context-def.hh | 2 +- lily/include/context-mod.hh | 2 +- lily/include/context.hh | 2 +- lily/include/dispatcher.hh | 2 +- lily/include/font-metric.hh | 2 +- lily/include/grob-array.hh | 2 +- lily/include/grob.hh | 2 +- lily/include/input.hh | 2 +- lily/include/lily-lexer.hh | 2 +- lily/include/lily-parser.hh | 2 +- lily/include/listener.hh | 2 +- lily/include/music-iterator.hh | 2 +- lily/include/music-output.hh | 2 +- lily/include/output-def.hh | 2 +- lily/include/page-marker.hh | 2 +- lily/include/paper-book.hh | 2 +- lily/include/paper-outputter.hh | 2 +- lily/include/pitch.hh | 2 +- lily/include/prob.hh | 2 +- lily/include/scm-hash.hh | 2 +- lily/include/score.hh | 2 +- lily/include/small-smobs.hh | 6 +++--- lily/include/smobs.hh | 2 +- lily/include/smobs.tcc | 2 +- lily/include/source-file.hh | 2 +- lily/include/stencil.hh | 2 +- lily/include/translator-group.hh | 2 +- lily/include/translator.hh | 2 +- lily/input-smob.cc | 2 +- lily/lily-lexer.cc | 2 +- lily/lily-parser.cc | 2 +- lily/music-iterator.cc | 2 +- lily/music-output.cc | 2 +- lily/output-def.cc | 2 +- lily/page-marker.cc | 2 +- lily/paper-book.cc | 2 +- lily/paper-outputter.cc | 2 +- lily/pitch.cc | 2 +- lily/prob.cc | 2 +- lily/scm-hash.cc | 2 +- lily/score.cc | 2 +- lily/source-file.cc | 2 +- lily/stencil.cc | 2 +- lily/translator-group.cc | 2 +- lily/translator.cc | 2 +- lily/undead.cc | 6 +++--- 58 files changed, 63 insertions(+), 63 deletions(-) diff --git a/lily/all-font-metrics.cc b/lily/all-font-metrics.cc index 0c855fd4d0..ca3703369a 100644 --- a/lily/all-font-metrics.cc +++ b/lily/all-font-metrics.cc @@ -72,7 +72,7 @@ All_font_metrics::~All_font_metrics () } SCM -All_font_metrics::mark_smob () +All_font_metrics::mark_smob () const { #if HAVE_PANGO_FT2 if (pango_dict_) diff --git a/lily/book.cc b/lily/book.cc index 8ba2aac908..bf32409104 100644 --- a/lily/book.cc +++ b/lily/book.cc @@ -107,7 +107,7 @@ Book::~Book () SCM -Book::mark_smob () +Book::mark_smob () const { if (paper_) scm_gc_mark (paper_->self_scm ()); diff --git a/lily/context-def.cc b/lily/context-def.cc index 7e391740a6..6289596603 100644 --- a/lily/context-def.cc +++ b/lily/context-def.cc @@ -97,7 +97,7 @@ Context_def::print_smob (SCM port, scm_print_state *) } SCM -Context_def::mark_smob () +Context_def::mark_smob () const { ASSERT_LIVE_IS_ALLOWED (self_scm ()); diff --git a/lily/context-mod.cc b/lily/context-mod.cc index fd2a25d2fe..c45e4f4d1a 100644 --- a/lily/context-mod.cc +++ b/lily/context-mod.cc @@ -46,7 +46,7 @@ Context_mod::print_smob (SCM port, scm_print_state *) } SCM -Context_mod::mark_smob () +Context_mod::mark_smob () const { return mods_; } diff --git a/lily/context-property.cc b/lily/context-property.cc index 5904254d7d..99b16f669b 100644 --- a/lily/context-property.cc +++ b/lily/context-property.cc @@ -66,7 +66,7 @@ typecheck_grob (SCM symbol, SCM value) class Grob_properties : public Simple_smob { public: - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; private: friend class Grob_property_info; @@ -97,7 +97,7 @@ private: const char Grob_properties::type_p_name_[] = "ly:grob-properties?"; SCM -Grob_properties::mark_smob () +Grob_properties::mark_smob () const { scm_gc_mark (alist_); scm_gc_mark (based_on_); diff --git a/lily/context.cc b/lily/context.cc index 51aa8f024e..da92c0748c 100644 --- a/lily/context.cc +++ b/lily/context.cc @@ -717,7 +717,7 @@ Context::print_smob (SCM port, scm_print_state *) } SCM -Context::mark_smob () +Context::mark_smob () const { scm_gc_mark (context_list_); scm_gc_mark (aliases_); diff --git a/lily/dispatcher.cc b/lily/dispatcher.cc index 2b80c3358e..1cb7dfaa87 100644 --- a/lily/dispatcher.cc +++ b/lily/dispatcher.cc @@ -41,7 +41,7 @@ Dispatcher::Dispatcher () } SCM -Dispatcher::mark_smob () +Dispatcher::mark_smob () const { scm_gc_mark (dispatchers_); scm_gc_mark (listen_classes_); diff --git a/lily/font-metric.cc b/lily/font-metric.cc index f18b2d7256..674aef76a9 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -95,7 +95,7 @@ Font_metric::derived_mark () const } SCM -Font_metric::mark_smob () +Font_metric::mark_smob () const { derived_mark (); return description_; diff --git a/lily/grob-array.cc b/lily/grob-array.cc index 27f05076f2..1cabe136ed 100644 --- a/lily/grob-array.cc +++ b/lily/grob-array.cc @@ -52,7 +52,7 @@ Grob_array::array () const } SCM -Grob_array::mark_smob () +Grob_array::mark_smob () const { #if 0 /* see System::derived_mark () const */ for (vsize i = 0; i < grobs_.size (); i++) diff --git a/lily/grob-smob.cc b/lily/grob-smob.cc index f3383e77fd..d038f9b840 100644 --- a/lily/grob-smob.cc +++ b/lily/grob-smob.cc @@ -26,7 +26,7 @@ const char Grob::type_p_name_[] = "ly:grob?"; SCM -Grob::mark_smob () +Grob::mark_smob () const { ASSERT_LIVE_IS_ALLOWED (self_scm ()); diff --git a/lily/include/all-font-metrics.hh b/lily/include/all-font-metrics.hh index 88820ea363..a2d090a6df 100644 --- a/lily/include/all-font-metrics.hh +++ b/lily/include/all-font-metrics.hh @@ -48,7 +48,7 @@ class All_font_metrics : public Smob All_font_metrics (All_font_metrics const &); public: - SCM mark_smob (); + SCM mark_smob () const; Index_to_charcode_map const *get_index_to_charcode_map (const string &filename, int face_index, diff --git a/lily/include/book.hh b/lily/include/book.hh index 6b1c2bfb14..3ea6c2c550 100644 --- a/lily/include/book.hh +++ b/lily/include/book.hh @@ -29,7 +29,7 @@ class Book : public Smob { public: - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Book (); SCM header_; diff --git a/lily/include/context-def.hh b/lily/include/context-def.hh index 9a7db15b6d..e8e8d3b68e 100644 --- a/lily/include/context-def.hh +++ b/lily/include/context-def.hh @@ -33,7 +33,7 @@ */ struct Context_def : public Smob { - SCM mark_smob (); + SCM mark_smob () const; int print_smob (SCM, scm_print_state *); static const char type_p_name_[]; virtual ~Context_def (); diff --git a/lily/include/context-mod.hh b/lily/include/context-mod.hh index a42ec91433..cef084c87e 100644 --- a/lily/include/context-mod.hh +++ b/lily/include/context-mod.hh @@ -36,7 +36,7 @@ */ struct Context_mod : public Simple_smob { - SCM mark_smob (); + SCM mark_smob () const; int print_smob (SCM, scm_print_state *); static const char type_p_name_[]; private: diff --git a/lily/include/context.hh b/lily/include/context.hh index 048bbd6dd4..85e2d1f44c 100644 --- a/lily/include/context.hh +++ b/lily/include/context.hh @@ -31,7 +31,7 @@ class Context : public Smob { public: - SCM mark_smob (); + SCM mark_smob () const; int print_smob (SCM, scm_print_state *); static const char type_p_name_[]; virtual ~Context (); diff --git a/lily/include/dispatcher.hh b/lily/include/dispatcher.hh index f7efad8214..a7c96f9201 100644 --- a/lily/include/dispatcher.hh +++ b/lily/include/dispatcher.hh @@ -28,7 +28,7 @@ class Dispatcher : public Smob { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Dispatcher (); private: diff --git a/lily/include/font-metric.hh b/lily/include/font-metric.hh index b1016b65c6..f1917b0c4a 100644 --- a/lily/include/font-metric.hh +++ b/lily/include/font-metric.hh @@ -34,7 +34,7 @@ class Font_metric : public Smob { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Font_metric (); private: diff --git a/lily/include/grob-array.hh b/lily/include/grob-array.hh index 87cb19e23d..e3631c8ea9 100644 --- a/lily/include/grob-array.hh +++ b/lily/include/grob-array.hh @@ -28,7 +28,7 @@ class Grob_array : public Simple_smob { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; private: vector grobs_; diff --git a/lily/include/grob.hh b/lily/include/grob.hh index 4748b17273..5dea5a948c 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -31,7 +31,7 @@ class Grob : public Smob { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Grob (); private: diff --git a/lily/include/input.hh b/lily/include/input.hh index b33b506730..cde9b87893 100644 --- a/lily/include/input.hh +++ b/lily/include/input.hh @@ -35,7 +35,7 @@ public: static const char type_p_name_[]; int print_smob (SCM, scm_print_state *); static SCM equal_p (SCM, SCM); - SCM mark_smob (); + SCM mark_smob () const; Source_file *get_source_file () const; char const *start () const; char const *end () const; diff --git a/lily/include/lily-lexer.hh b/lily/include/lily-lexer.hh index 5a622c9317..7a4bc15de5 100644 --- a/lily/include/lily-lexer.hh +++ b/lily/include/lily-lexer.hh @@ -35,7 +35,7 @@ class Lily_lexer : public Smob, public Includable_lexer { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Lily_lexer (); private: diff --git a/lily/include/lily-parser.hh b/lily/include/lily-parser.hh index 6d299d48b4..cb36382b3b 100644 --- a/lily/include/lily-parser.hh +++ b/lily/include/lily-parser.hh @@ -35,7 +35,7 @@ class Lily_parser : public Smob static SCM do_yyparse_trampoline (void *parser); public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Lily_parser (); Lily_lexer *lexer_; diff --git a/lily/include/listener.hh b/lily/include/listener.hh index 6f8995c64e..00a64eebb8 100644 --- a/lily/include/listener.hh +++ b/lily/include/listener.hh @@ -108,7 +108,7 @@ public: return SCM_UNSPECIFIED; } - SCM mark_smob () + SCM mark_smob () const { scm_gc_mark (callback_); return target_; diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index 2afa31941a..30f27ba894 100644 --- a/lily/include/music-iterator.hh +++ b/lily/include/music-iterator.hh @@ -62,7 +62,7 @@ class Music_iterator : public Smob { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Music_iterator (); protected: diff --git a/lily/include/music-output.hh b/lily/include/music-output.hh index 37437fbcac..3d1d25728a 100644 --- a/lily/include/music-output.hh +++ b/lily/include/music-output.hh @@ -30,7 +30,7 @@ class Music_output : public Smob { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Music_output (); private: diff --git a/lily/include/output-def.hh b/lily/include/output-def.hh index 1364b64666..5712639cb0 100644 --- a/lily/include/output-def.hh +++ b/lily/include/output-def.hh @@ -50,7 +50,7 @@ class Output_def : public Smob { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Output_def (); VIRTUAL_COPY_CONSTRUCTOR (Output_def, Output_def); diff --git a/lily/include/page-marker.hh b/lily/include/page-marker.hh index cb823d0f0d..02233d30a6 100644 --- a/lily/include/page-marker.hh +++ b/lily/include/page-marker.hh @@ -26,7 +26,7 @@ class Page_marker : public Smob { public: - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Page_marker (); private: diff --git a/lily/include/paper-book.hh b/lily/include/paper-book.hh index 40a40a39b6..b105cdb3de 100644 --- a/lily/include/paper-book.hh +++ b/lily/include/paper-book.hh @@ -30,7 +30,7 @@ class Paper_book : public Smob { public: - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Paper_book (); private: diff --git a/lily/include/paper-outputter.hh b/lily/include/paper-outputter.hh index 73daf148b4..cd1a5e2c92 100644 --- a/lily/include/paper-outputter.hh +++ b/lily/include/paper-outputter.hh @@ -33,7 +33,7 @@ class Paper_outputter : public Smob { public: - SCM mark_smob (); + SCM mark_smob () const; virtual ~Paper_outputter (); private: SCM output_module_; diff --git a/lily/include/pitch.hh b/lily/include/pitch.hh index 90b4317f68..3e78b79952 100644 --- a/lily/include/pitch.hh +++ b/lily/include/pitch.hh @@ -37,7 +37,7 @@ class Pitch : public Simple_smob public: static SCM equal_p (SCM, SCM); int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; private: int octave_; diff --git a/lily/include/prob.hh b/lily/include/prob.hh index 9f6ad9609a..1f437ac5ef 100644 --- a/lily/include/prob.hh +++ b/lily/include/prob.hh @@ -35,7 +35,7 @@ class Prob : public Smob { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static SCM equal_p (SCM, SCM); static const char type_p_name_[]; virtual ~Prob (); diff --git a/lily/include/scm-hash.hh b/lily/include/scm-hash.hh index d14997676a..8a1922d3c3 100644 --- a/lily/include/scm-hash.hh +++ b/lily/include/scm-hash.hh @@ -47,7 +47,7 @@ class Scheme_hash_table : public Smob { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; virtual ~Scheme_hash_table (); bool try_retrieve (SCM key, SCM *val); bool contains (SCM key) const; diff --git a/lily/include/score.hh b/lily/include/score.hh index 0baf198fa3..b3ece8960a 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -30,7 +30,7 @@ class Score : public Smob { public: - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Score (); private: diff --git a/lily/include/small-smobs.hh b/lily/include/small-smobs.hh index 41171b4881..07fd4ef341 100644 --- a/lily/include/small-smobs.hh +++ b/lily/include/small-smobs.hh @@ -32,7 +32,7 @@ public: static SCM make_smob (SCM arg1 = SCM_UNDEFINED) { SCM_RETURN_NEWSMOB (Smob_base::smob_tag (), SCM_UNPACK (arg1)); } - SCM mark_smob () { return scm1 (); }; + SCM mark_smob () const { return scm1 (); }; static Super *unchecked_unsmob (SCM s) { return reinterpret_cast (SCM_UNPACK (s)); } @@ -52,7 +52,7 @@ public: SCM_UNPACK (arg1), SCM_UNPACK (arg2)); } - SCM mark_smob () + SCM mark_smob () const { scm_gc_mark (scm2 ()); return scm1 (); @@ -80,7 +80,7 @@ public: SCM_UNPACK (arg2), SCM_UNPACK (arg3)); } - SCM mark_smob () + SCM mark_smob () const { scm_gc_mark (scm3 ()); scm_gc_mark (scm2 ()); diff --git a/lily/include/smobs.hh b/lily/include/smobs.hh index 3bcec9931e..c5edc4b01f 100644 --- a/lily/include/smobs.hh +++ b/lily/include/smobs.hh @@ -177,7 +177,7 @@ private: // Most default functions are do-nothings. void init() will // recognize their address when not overriden and will then refrain // altogether from passing the the respective callbacks to GUILE. - SCM mark_smob (void); + SCM mark_smob (void) const; static SCM mark_trampoline (SCM); // Used for calling mark_smob static size_t free_smob (SCM obj); static SCM equal_p (SCM, SCM); diff --git a/lily/include/smobs.tcc b/lily/include/smobs.tcc index f76609bf5b..c063da2f93 100644 --- a/lily/include/smobs.tcc +++ b/lily/include/smobs.tcc @@ -65,7 +65,7 @@ Smob_base::register_ptr (Super *p) // Defaults, should not actually get called template SCM -Smob_base::mark_smob () +Smob_base::mark_smob () const { return SCM_UNSPECIFIED; } diff --git a/lily/include/source-file.hh b/lily/include/source-file.hh index 223725f462..8c67cd9be5 100644 --- a/lily/include/source-file.hh +++ b/lily/include/source-file.hh @@ -39,7 +39,7 @@ class Source_file : public Smob { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Source_file (); private: diff --git a/lily/include/stencil.hh b/lily/include/stencil.hh index 23a5be7fbc..6ccb9252bb 100644 --- a/lily/include/stencil.hh +++ b/lily/include/stencil.hh @@ -58,7 +58,7 @@ using namespace std; class Stencil : public Simple_smob { public: - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; private: Box dim_; diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index 97906c1602..a7d3a4da1b 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -50,7 +50,7 @@ struct Translator_method_binding class Translator_group : public Smob { public: - SCM mark_smob (); + SCM mark_smob () const; int print_smob (SCM, scm_print_state *); static const char type_p_name_[]; virtual ~Translator_group (); diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 22e656ceb8..74f9ecb146 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -97,7 +97,7 @@ public: typedef void (Translator::*Grob_info_callback) (Grob_info); typedef void (Translator::*Callback) (void); int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; virtual ~Translator (); private: diff --git a/lily/input-smob.cc b/lily/input-smob.cc index 605b790a68..830f946612 100644 --- a/lily/input-smob.cc +++ b/lily/input-smob.cc @@ -28,7 +28,7 @@ Input dummy_input_global; const char Input::type_p_name_[] = "ly:input-location?"; SCM -Input::mark_smob () +Input::mark_smob () const { if (Source_file *sf = get_source_file ()) return sf->self_scm (); diff --git a/lily/lily-lexer.cc b/lily/lily-lexer.cc index d9d284864f..6d4de7f7fe 100644 --- a/lily/lily-lexer.cc +++ b/lily/lily-lexer.cc @@ -368,7 +368,7 @@ Lily_lexer::add_lexed_char (int count) const char Lily_lexer::type_p_name_[] = "ly:lily-lexer?"; SCM -Lily_lexer::mark_smob () +Lily_lexer::mark_smob () const { ASSERT_LIVE_IS_ALLOWED (self_scm ()); diff --git a/lily/lily-parser.cc b/lily/lily-parser.cc index 170a5e77e4..54b0211d15 100644 --- a/lily/lily-parser.cc +++ b/lily/lily-parser.cc @@ -77,7 +77,7 @@ Lily_parser::~Lily_parser () } SCM -Lily_parser::mark_smob () +Lily_parser::mark_smob () const { scm_gc_mark (closures_); return (lexer_) ? lexer_->self_scm () : SCM_EOL; diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index a9098bcba3..ced7fa7952 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -193,7 +193,7 @@ Music_iterator::get_music () const const char Music_iterator::type_p_name_[] = "ly:iterator?"; SCM -Music_iterator::mark_smob () +Music_iterator::mark_smob () const { derived_mark (); /* diff --git a/lily/music-output.cc b/lily/music-output.cc index 0907bf38f4..dbbf606083 100644 --- a/lily/music-output.cc +++ b/lily/music-output.cc @@ -42,7 +42,7 @@ Music_output::derived_mark () const const char Music_output::type_p_name_[] = "ly:music-output?"; SCM -Music_output::mark_smob () +Music_output::mark_smob () const { derived_mark (); return SCM_EOL; diff --git a/lily/output-def.cc b/lily/output-def.cc index b58feaea6c..4415f83f9d 100644 --- a/lily/output-def.cc +++ b/lily/output-def.cc @@ -63,7 +63,7 @@ Output_def::~Output_def () SCM -Output_def::mark_smob () +Output_def::mark_smob () const { /* FIXME: why is this necessary? all paper_ should be protected by themselves. */ diff --git a/lily/page-marker.cc b/lily/page-marker.cc index 1e393862e6..02b9c4ad19 100644 --- a/lily/page-marker.cc +++ b/lily/page-marker.cc @@ -43,7 +43,7 @@ Page_marker::~Page_marker () const char Page_marker::type_p_name_[] = "ly:page-marker?"; SCM -Page_marker::mark_smob () +Page_marker::mark_smob () const { scm_gc_mark (symbol_); scm_gc_mark (permission_); diff --git a/lily/paper-book.cc b/lily/paper-book.cc index b79041bb7b..dfa52f4f79 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -54,7 +54,7 @@ Paper_book::~Paper_book () const char Paper_book::type_p_name_[] = "ly:paper-book?"; SCM -Paper_book::mark_smob () +Paper_book::mark_smob () const { if (paper_) scm_gc_mark (paper_->self_scm ()); diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index 269e1e294c..5da493ba48 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -62,7 +62,7 @@ Paper_outputter::~Paper_outputter () SCM -Paper_outputter::mark_smob () +Paper_outputter::mark_smob () const { scm_gc_mark (output_module_); return file_; diff --git a/lily/pitch.cc b/lily/pitch.cc index 1415178372..7772651525 100644 --- a/lily/pitch.cc +++ b/lily/pitch.cc @@ -221,7 +221,7 @@ Pitch::down_to (int notename) const char Pitch::type_p_name_[] = "ly:pitch?"; SCM -Pitch::mark_smob () +Pitch::mark_smob () const { return scale_->self_scm (); } diff --git a/lily/prob.cc b/lily/prob.cc index 24ce604db9..3f6ba2fef1 100644 --- a/lily/prob.cc +++ b/lily/prob.cc @@ -113,7 +113,7 @@ Prob::derived_mark () const } SCM -Prob::mark_smob () +Prob::mark_smob () const { ASSERT_LIVE_IS_ALLOWED (self_scm ()); diff --git a/lily/scm-hash.cc b/lily/scm-hash.cc index 5eb048f6d1..a9c26c620d 100644 --- a/lily/scm-hash.cc +++ b/lily/scm-hash.cc @@ -72,7 +72,7 @@ Scheme_hash_table::~Scheme_hash_table () } SCM -Scheme_hash_table::mark_smob () +Scheme_hash_table::mark_smob () const { scm_gc_mark (hash_tab_); return SCM_EOL; diff --git a/lily/score.cc b/lily/score.cc index 895954a01a..52f9d2ac53 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -62,7 +62,7 @@ Score::~Score () const char Score::type_p_name_[] = "ly:score?"; SCM -Score::mark_smob () +Score::mark_smob () const { scm_gc_mark (header_); for (vsize i = defs_.size (); i--;) diff --git a/lily/source-file.cc b/lily/source-file.cc index 1118b9d286..b06edbf0b3 100644 --- a/lily/source-file.cc +++ b/lily/source-file.cc @@ -365,7 +365,7 @@ Source_file::get_port () const const char Source_file::type_p_name_[] = "ly:source-file?"; SCM -Source_file::mark_smob () +Source_file::mark_smob () const { return str_port_; } diff --git a/lily/stencil.cc b/lily/stencil.cc index 980618ceaa..987a879053 100644 --- a/lily/stencil.cc +++ b/lily/stencil.cc @@ -39,7 +39,7 @@ Stencil::Stencil (Box b, SCM func) } SCM -Stencil::mark_smob () +Stencil::mark_smob () const { return expr_; } diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 73a9c602e0..fc1c2a8a7b 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -356,7 +356,7 @@ Translator_group::print_smob (SCM port, scm_print_state *) } SCM -Translator_group::mark_smob () +Translator_group::mark_smob () const { derived_mark (); scm_gc_mark (protected_events_); diff --git a/lily/translator.cc b/lily/translator.cc index b20e2aa4ed..54d97c3c19 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -189,7 +189,7 @@ Translator::static_translator_description (const char *grobs, SMOBS */ SCM -Translator::mark_smob () +Translator::mark_smob () const { derived_mark (); return SCM_EOL; diff --git a/lily/undead.cc b/lily/undead.cc index 40d8316157..db2d6f19e0 100644 --- a/lily/undead.cc +++ b/lily/undead.cc @@ -23,17 +23,17 @@ class Undead : public Simple_smob { public: int print_smob (SCM, scm_print_state *); - SCM mark_smob (); + SCM mark_smob () const; static const char type_p_name_[]; private: SCM object_; public: - SCM object () { return object_; } + SCM object () const { return object_; } Undead (SCM object = SCM_UNDEFINED) : object_ (object) { }; }; SCM -Undead::mark_smob () +Undead::mark_smob () const { bool saved = parsed_objects_should_be_dead; parsed_objects_should_be_dead = false; -- 2.39.2