]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/scope.cc
release: 1.3.74
[lilypond.git] / lily / scope.cc
index c04878f93404c54865193ea6e60014e9224185df..85837e5d0979ca048aa9872620b6d74bb1bf9e6a 100644 (file)
 
 Scope::~Scope ()
 {
-  delete id_dict_;
+  scm_unprotect_object (id_dict_->self_scm ());
 }
 
 Scope::Scope (Scope const&s)
-  : id_dict_ (new Scheme_hash_table (*s.id_dict_))
 {
+  id_dict_ =new Scheme_hash_table (*s.id_dict_);
 }
 
 Scope::Scope ()
@@ -72,7 +72,7 @@ Scope::set (String s, SCM id)
 void
 Scope::set (String s, Identifier * id) 
 {
-  return id_dict_->set (ly_symbol2scm (s.ch_C()), smobify (id));
+  return id_dict_->set (ly_symbol2scm (s.ch_C()), id->self_scm ());
 }
 
 SCM