lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make bin got dumb because of "Fix description in lily/include/smobs.hh"


From: Janek Warchoł
Subject: make bin got dumb because of "Fix description in lily/include/smobs.hh"
Date: Tue, 3 Jul 2012 19:23:56 +0200

Hi,

until recently, 'make bin' was a very smart tool: it recompiled only
necessary .cc files, not everything.  That was lifesaving: instead of
having to wait for 5 minutes, i got the results of my changes in 5
seconds.  Unfortunately, this is no longer the case: no matter how
trivial the change, make bin always goes through all .cc files.  I've
found that this behaviour was caused by commit
43fe858eb18418ae1d8867786ad873b7a4e2ae8a.  I have no idea why this
happens, but i guess this isn't an intentional change?  I've checked
that reverting this commit restores previous behaviour of make bin.

commit 43fe858eb18418ae1d8867786ad873b7a4e2ae8a
Author: David Kastrup <address@hidden>
Date:   Sat Jun 30 15:06:44 2012 +0200

    Fix description in lily/include/smobs.hh

diff --git a/lily/include/smobs.hh b/lily/include/smobs.hh
index cd28a29..fb4fa53 100644
--- a/lily/include/smobs.hh
+++ b/lily/include/smobs.hh
@@ -46,7 +46,7 @@

   The constructor for a complex smob should have 3 steps:

-  * initialize all SCM members to a non-immediate value (like SCM_EOL)
+  * initialize all SCM members to an immediate value (like SCM_EOL)

   * call smobify_self ()

@@ -67,7 +67,13 @@

   Complex_smob *p = new Complex_smob;
   list = scm_cons (p->self_scm (), list);
-  scm_gc_unprotect_object (p->self_scm ());
+  p->unprotect ();
+
+  Since unprotect returns the SCM object itself, this particular case
+  can be written as
+
+  Complex_smob *p = new Complex_smob;
+  list = scm_cons (p->unprotect (), list);

   Complex smobs are made with DECLARE_SMOBS (Classname) in the class
   declaration.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]