From c024c17a1c1c761b9d34193e82b38e968a3edb74 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Mon, 25 Aug 2014 18:40:54 +0200 Subject: [PATCH] Don't assign 'safe' values to self_scm_ outside of smobify_self --- lily/dispatcher.cc | 1 - lily/font-metric.cc | 1 - lily/grob.cc | 2 -- lily/include/ly-smobs.icc | 1 + lily/prob.cc | 2 -- lily/scheme-listener.cc | 1 - lily/source-file.cc | 1 - lily/translator.cc | 1 - 8 files changed, 1 insertion(+), 9 deletions(-) diff --git a/lily/dispatcher.cc b/lily/dispatcher.cc index feee3f24a7..5f0e38007e 100644 --- a/lily/dispatcher.cc +++ b/lily/dispatcher.cc @@ -33,7 +33,6 @@ Dispatcher::~Dispatcher () Dispatcher::Dispatcher () { - self_scm_ = SCM_EOL; listeners_ = SCM_EOL; dispatchers_ = SCM_EOL; listen_classes_ = SCM_EOL; diff --git a/lily/font-metric.cc b/lily/font-metric.cc index af5cecb63f..f12fc4ed2c 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -60,7 +60,6 @@ Font_metric::find_by_name (string s) const Font_metric::Font_metric () { description_ = SCM_EOL; - self_scm_ = SCM_EOL; smobify_self (); } diff --git a/lily/grob.cc b/lily/grob.cc index 90a7dbac20..c45dd09b27 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -51,7 +51,6 @@ Grob::Grob (SCM basicprops) { /* FIXME: default should be no callback. */ - self_scm_ = SCM_EOL; layout_ = 0; original_ = 0; interfaces_ = SCM_EOL; @@ -96,7 +95,6 @@ Grob::Grob (SCM basicprops) Grob::Grob (Grob const &s) { original_ = (Grob *) & s; - self_scm_ = SCM_EOL; immutable_property_alist_ = s.immutable_property_alist_; mutable_property_alist_ = SCM_EOL; diff --git a/lily/include/ly-smobs.icc b/lily/include/ly-smobs.icc index 2fba5f55a4..3ff54cc49e 100644 --- a/lily/include/ly-smobs.icc +++ b/lily/include/ly-smobs.icc @@ -122,6 +122,7 @@ goodly sure \ */ \ SCM s; \ + self_scm_ = SCM_UNDEFINED; \ SCM_NEWSMOB (s, CL::smob_tag_, this); \ self_scm_ = s; \ scm_gc_register_collectable_memory (this, sizeof (CL), #CL " smob"); \ diff --git a/lily/prob.cc b/lily/prob.cc index 8b14f73416..b5619fae66 100644 --- a/lily/prob.cc +++ b/lily/prob.cc @@ -80,7 +80,6 @@ Prob::equal_p (SCM sa, SCM sb) Prob::Prob (SCM type, SCM immutable_init) { - self_scm_ = SCM_EOL; mutable_property_alist_ = SCM_EOL; immutable_property_alist_ = immutable_init; type_ = type; @@ -95,7 +94,6 @@ Prob::Prob (Prob const &src) { immutable_property_alist_ = src.immutable_property_alist_; mutable_property_alist_ = SCM_EOL; - self_scm_ = SCM_EOL; type_ = src.type_; /* First we smobify_self, then we copy over the stuff. If we don't, diff --git a/lily/scheme-listener.cc b/lily/scheme-listener.cc index fe57c3a719..2388d4a88a 100644 --- a/lily/scheme-listener.cc +++ b/lily/scheme-listener.cc @@ -32,7 +32,6 @@ IMPLEMENT_DEFAULT_EQUAL_P (Scheme_listener); Scheme_listener::Scheme_listener (SCM c) { callback_ = SCM_EOL; - self_scm_ = SCM_EOL; smobify_self (); callback_ = c; } diff --git a/lily/source-file.cc b/lily/source-file.cc index e4679bda60..d80704ae76 100644 --- a/lily/source-file.cc +++ b/lily/source-file.cc @@ -102,7 +102,6 @@ Source_file::init () istream_ = 0; line_offset_ = 0; str_port_ = SCM_EOL; - self_scm_ = SCM_EOL; smobify_self (); } diff --git a/lily/translator.cc b/lily/translator.cc index d505e656b7..5f4a39bb0e 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -36,7 +36,6 @@ Translator::~Translator () void Translator::init () { - self_scm_ = SCM_EOL; daddy_context_ = 0; smobify_self (); } -- 2.39.2