From: Han-Wen Nienhuys Date: Fri, 2 May 2008 02:19:25 +0000 (-0300) Subject: Add ly:prob-[im]mutable-properties Scheme bindings. X-Git-Tag: release/2.11.46-1~28^2~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f2d3356afabababe82484a3ded193e7cc779f46a;p=lilypond.git Add ly:prob-[im]mutable-properties Scheme bindings. --- diff --git a/lily/include/prob.hh b/lily/include/prob.hh index 635df370e1..feabb4cf78 100644 --- a/lily/include/prob.hh +++ b/lily/include/prob.hh @@ -41,7 +41,7 @@ public: Prob (Prob const &); virtual string name () const; SCM type () const { return type_; } - SCM get_property_alist (bool mutble) const; + SCM get_property_alist (bool _mutable) const; SCM internal_get_property (SCM sym) const; void instrumented_set_property (SCM, SCM, const char*, int, const char*); void internal_set_property (SCM sym, SCM val); diff --git a/lily/prob-scheme.cc b/lily/prob-scheme.cc index 52b32b96f5..a56b84ea9f 100644 --- a/lily/prob-scheme.cc +++ b/lily/prob-scheme.cc @@ -75,3 +75,25 @@ LY_DEFINE (ly_make_prob, "ly:make-prob", return pr->unprotect (); } + + +LY_DEFINE (ly_prob_mutable_properties, "ly:prob-mutable-properties", + 1, 0, 0, + (SCM prob), + "Retrieve an alist of mutable properties") +{ + LY_ASSERT_SMOB (Prob, prob, 1); + Prob *ps = unsmob_prob (prob); + return ps->get_property_alist (true); +} + +LY_DEFINE (ly_prob_immutable_properties, "ly:prob-immutable-properties", + 1, 0, 0, + (SCM prob), + "Retrieve an alist of mutable properties") +{ + LY_ASSERT_SMOB (Prob, prob, 1); + Prob *ps = unsmob_prob (prob); + return ps->get_property_alist (false); +} +