lilypond-devel
[Top][All Lists]
Advanced

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

Re: Make music functions callable from Scheme (issue 244840043 by addres


From: k-ohara5a5a
Subject: Re: Make music functions callable from Scheme (issue 244840043 by address@hidden)
Date: Sun, 07 Jun 2015 22:16:00 +0000

LGTM

I gather that Scheme fluids are variables with global scope but distinct
storage for each Scheme thread, so they can be used to reference to the
specific parser (if any) in use by the thread that called the music
function.


https://codereview.appspot.com/244840043/diff/80001/Documentation/changes.tely
File Documentation/changes.tely (right):

https://codereview.appspot.com/244840043/diff/80001/Documentation/changes.tely#newcode68
Documentation/changes.tely:68: as if they were proper Scheme functions.
Argument checking will
Skip "as if they were.." if they really are proper Scheme functions.

https://codereview.appspot.com/244840043/diff/80001/lily/include/fluid.hh
File lily/include/fluid.hh (right):

https://codereview.appspot.com/244840043/diff/80001/lily/include/fluid.hh#newcode24
lily/include/fluid.hh:24:
"storage of Scheme fluids" so that people know you mean the Lisp/Scheme
concept and not the normal meaning of 'fluid'.

https://codereview.appspot.com/244840043/diff/80001/lily/include/fluid.hh#newcode36
lily/include/fluid.hh:36: // where the garbage collector will be able to
find it.
The passive voice leaves things ambiguous.  I think "declare only local
Fluid variables, not statics, not arrays of Fluids, so that the Fluid
object is in automatic storage where the Guile garbage collector can
find it."

https://codereview.appspot.com/244840043/diff/80001/lily/include/fluid.hh#newcode44
lily/include/fluid.hh:44: SCM value_;
// the cache

https://codereview.appspot.com/244840043/diff/80001/lily/include/music-function.hh
File lily/include/music-function.hh (right):

https://codereview.appspot.com/244840043/diff/80001/lily/include/music-function.hh#newcode34
lily/include/music-function.hh:34: SCM call (SCM args);
Wouldn't this be more conventional as a static member function ?
  static SCM call( SCM music_function_smob, SCM args_list);

https://codereview.appspot.com/244840043/



reply via email to

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