+
+ return (handle == SCM_BOOL_F) ? SCM_EOL : scm_cdr (handle);
+}
+
+SCM
+Grob::internal_get_property (SCM sym) const
+{
+ SCM val = get_property_data (sym);
+ if (ly_is_procedure (val)
+ || is_simple_closure (val))
+ {
+ Grob *me = ((Grob*)this);
+ val = me->try_callback_on_alist (&me->mutable_property_alist_, sym, val);
+ }
+
+ return val;
+}
+
+#ifndef NDEBUG
+#include "protected-scm.hh"
+
+Protected_scm grob_property_callback_stack = SCM_EOL;
+bool debug_property_callbacks = 0;
+#endif
+
+SCM
+Grob::try_callback_on_alist (SCM *alist, SCM sym, SCM proc)
+{
+ SCM marker = ly_symbol2scm ("calculation-in-progress");
+ /*
+ need to put a value in SYM to ensure that we don't get a
+ cyclic call chain.
+ */
+ *alist = scm_assq_set_x (*alist, sym, marker);
+
+#ifndef NDEBUG
+ if (debug_property_callbacks)
+ grob_property_callback_stack = scm_acons (sym, proc, grob_property_callback_stack);
+#endif