]> git.donarmstrong.com Git - lilypond.git/commitdiff
Add ly:prob-[im]mutable-properties Scheme bindings.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 2 May 2008 02:19:25 +0000 (23:19 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 2 May 2008 02:19:25 +0000 (23:19 -0300)
lily/include/prob.hh
lily/prob-scheme.cc

index 635df370e1c533d17a6453f4e097ca7057e29188..feabb4cf784b47d6a4a25fc00c94b0dc7e1a82e3 100644 (file)
@@ -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);
index 52b32b96f5b78c58ee413128bd9fa88340804d9a..a56b84ea9f1617b8428b443d6b431555c27cecc8 100644 (file)
@@ -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);
+}
+