lilypond-devel
[Top][All Lists]
Advanced

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

Re: C++ question on wrapper API for setting Guile fluids


From: Dan Eble
Subject: Re: C++ question on wrapper API for setting Guile fluids
Date: Thu, 21 Apr 2022 06:23:40 -0400

On Apr 21, 2022, at 02:55, Luca Fascione <l.fascione@gmail.com> wrote:
> 
> I'd think you can up this by one, and get a cleaner looking piece of code
> if you implement scm_dynwind_fluid() as a forwarded method on your context:
...
>  dwc.fluid (fluid2, value2);

Here's something that does bother me.  That reads as if dwc holds state 
affecting the outcome, which is untrue.

    {
      Dynwind_context dwc;
      // . . .

      {
        Dynwind_context dwc2;
        // . . .
        dwc.free (p);  // not what it seems
        // . . .
      }
    }

The scm_ functions operate implicitly on the current context.  Dressing them 
differently would be confusing.
— 
Dan




reply via email to

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