]> git.donarmstrong.com Git - lilypond.git/commit
Issue 4378: Rewrite Protected_scm for static lifetime requirements
authorDavid Kastrup <dak@gnu.org>
Fri, 8 May 2015 09:04:01 +0000 (11:04 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 12 May 2015 10:32:55 +0000 (12:32 +0200)
commitaddcfaa3225a64aa23d29d9171b721c8a4895ef9
tree4a04b2a03bd1281a491817fb7cca249d35e59861
parent37d6daa25b4bab4a0971ef84d965d5b6c8e581f0
Issue 4378: Rewrite Protected_scm for static lifetime requirements

The use of Protected_scm is required where the per-instance object
marking mechanisms don't work.  This patch changes its semantics to
cater exclusively for the use case of permanent variable life time (as
opposed to permanent value life time).  It no longer employs the
reversible scm_gc_protect_object but rather uses scm_permanent_object
for protecting one cons cell as its principal storage mechanism.

It is also ensured that construction/destruction (which happen at very
early/late phases of program execution) do not require a working memory
subsystem.
lily/include/protected-scm.hh
lily/protected-scm.cc