]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/smobs.hh
Run grand replace for 2015.
[lilypond.git] / lily / include / smobs.hh
index 2d1cbd4d892ac91857118d4fcfda1c887bc88e80..a816b67ca3df9e0f0f2228e5729102c06d0e0036 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1999--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1999--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -255,6 +255,9 @@ class Smob : public Smob_base<Super> {
 private:
   SCM self_scm_;
   SCM protection_cons_;
+  Smob (const Smob<Super> &); // Do not define!  Not copyable!
+protected:
+  Smob () : self_scm_ (SCM_UNDEFINED), protection_cons_ (SCM_EOL) { };
 public:
   static size_t free_smob (SCM obj)
   {
@@ -263,7 +266,6 @@ public:
   }
   SCM unprotected_smobify_self ()
   {
-    self_scm_ = SCM_UNDEFINED;
     self_scm_ = Smob_base<Super>::register_ptr (static_cast<Super *> (this));
     return self_scm_;
   }
@@ -277,7 +279,6 @@ public:
     return self_scm_;
   }
   void smobify_self () {
-    protection_cons_ = SCM_EOL;
     self_scm_ = unprotected_smobify_self ();
     protect ();
   }