- Score_element* me = (Score_element*)cme;
- Score_element *common = me->parent_l (axis);
- SCM support = me->get_elt_property ("side-support");
- for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
- {
- Score_element * e = unsmob_element (gh_car (s));
- if (e)
- common = common->common_refpoint (e, axis);
- }
+ Grob *me = unsmob_grob (element_smob);
+ Axis a = (Axis) gh_scm2int (axis);
+
+ return general_side_position (me, a, true);
+}
+
+
+/*
+ Puts the element next to the support, optionally taking in
+ account the extent of the support.
+*/
+SCM
+Side_position_interface::general_side_position (Grob * me, Axis a, bool use_extents)
+{
+
+
+ /*
+ As this is only used as a callback, this is called only once. We
+ could wipe SIDE-SUPPORT-ELEMENTS after we retrieve it to conserve
+ memory; however -- we should look more into benefits of such actions?
+
+ The benefit is small, it seems: total GC times taken don't
+ differ. Would this also hamper Generational GC ?
+
+ */
+ SCM support = me->get_grob_property ("side-support-elements");
+ Grob *common = common_refpoint_of_list (support, me->get_parent (a), a);