]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 2754 cleanup: Only complain once about any undead object
authorDavid Kastrup <dak@gnu.org>
Sat, 8 Sep 2012 14:40:39 +0000 (16:40 +0200)
committerDavid Kastrup <dak@gnu.org>
Sat, 8 Sep 2012 14:40:39 +0000 (16:40 +0200)
Embarrassingly, commit 2ea3798f3473a7dd02b85ac311aa9b8de4938c3c only
implemented the requisite fix in one place.  This replicates the code
for avoiding duplicate error messages at the second call place of
ly:parsed-undead-list! in lily.scm.

scm/lily.scm

index 35a16019a1e74df912b0166dbf1cf28e71594a19..74c5562f48067052df4f7d10b8872ac8260e8a79 100644 (file)
@@ -843,10 +843,13 @@ PIDs or the number of the process."
          (ly:set-option 'debug-gc-assert-parsed-dead #t)
          (gc)
          (ly:set-option 'debug-gc-assert-parsed-dead #f)
-        (for-each
-         (lambda (x)
-           (ly:programming-error "Parsed object should be dead: ~a" x))
-         (ly:parsed-undead-list!))
+         (for-each
+          (lambda (x)
+            (if (not (hashq-ref gc-zombies x))
+                (begin
+                  (ly:programming-error "Parsed object should be dead: ~a" x)
+                  (hashq-set! gc-zombies x #t))))
+          (ly:parsed-undead-list!))
          (if (ly:get-option 'debug-gc)
              (dump-gc-protects)
              (ly:reset-all-fonts))