lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 2376: Automatic footnotes on \null markups causes unexpected r


From: dak
Subject: Re: Issue 2376: Automatic footnotes on \null markups causes unexpected results (issue 5755058)
Date: Wed, 07 Mar 2012 08:48:56 +0000


http://codereview.appspot.com/5755058/diff/1/lily/page-layout-problem.cc
File lily/page-layout-problem.cc (right):

http://codereview.appspot.com/5755058/diff/1/lily/page-layout-problem.cc#newcode343
lily/page-layout-problem.cc:343: return footnote_separator;
Uh, Mike?

You call a Scheme function for calculating a stencil, then unsmob the
stencil and return a pointer to the unsmobbbed entity.  The SCM
expression is not kept around in any manner.  How on Earth is the Scheme
garbage collector supposed to guess that the Stencil for which you have
retained a pointer but no referring SCM is not supposed to be collected
right away?

That's not just buggy code, it is also a function call interface that
can't be made to work.  You can't return pointers to unsmobbed entities
for which no SCM reference is retained anywhere.

Given the level and amount of code you write, it might be worth
investing the time rereading the garbage collection chapter of the Guile
manual.

I'll be preparing a fix for this one as well.

http://codereview.appspot.com/5755058/



reply via email to

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