]> git.donarmstrong.com Git - lilypond.git/commitdiff
Let second argument of interpret_stencil_expression return an SCM value
authorDavid Kastrup <dak@gnu.org>
Sun, 4 Aug 2013 22:53:57 +0000 (00:53 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 11 Aug 2013 08:23:13 +0000 (10:23 +0200)
lily/include/paper-outputter.hh
lily/include/stencil.hh
lily/paper-outputter.cc
lily/stencil-interpret.cc
lily/stencil-scheme.cc

index 1ac0a74dfde8ee538e003305c4197458db1a3837..ef1b1b7a224d99b2f35232ae19bc08012051f6d0 100644 (file)
@@ -46,7 +46,7 @@ public:
   SCM dump_string (SCM);
   SCM file () const;
   SCM module () const;
-  void output_scheme (SCM scm);
+  SCM output_scheme (SCM scm);
   void output_stencil (Stencil);
   SCM scheme_to_string (SCM);
 };
index 6a89e022daba721fe449b708bb5867616c21ccfa..34bafa6d41a18c9958303028a16d517ad893029a 100644 (file)
@@ -93,7 +93,7 @@ public:
 DECLARE_UNSMOB (Stencil, stencil);
 
 void interpret_stencil_expression (SCM expr,
-                                   void (*func) (void *, SCM),
+                                   SCM (*func) (void *, SCM),
                                    void *func_arg,
                                    Offset o);
 SCM find_expression_fonts (SCM expr);
index 57efb2fb35be2c547ab963c8ab0726ee62c296b0..06b490472c7b5a2ef9e378dbcfa87e07afc75da3 100644 (file)
@@ -105,17 +105,20 @@ Paper_outputter::module () const
   return output_module_;
 }
 
-void
+SCM
 Paper_outputter::output_scheme (SCM scm)
 {
-  dump_string (scheme_to_string (scm));
+  SCM str = scheme_to_string (scm);
+  if (scm_is_string (str))
+    dump_string (str);
+  return str;
 }
 
-void
+SCM
 paper_outputter_dump (void *po, SCM x)
 {
   Paper_outputter *me = (Paper_outputter *) po;
-  me->output_scheme (x);
+  return me->output_scheme (x);
 }
 
 void
index 8214af5dcc8e40a427dcd80212a0931a74bcef6f..d3966c94afdb794dfb2ee7d0822baaa69a654444 100644 (file)
@@ -21,7 +21,7 @@
 
 void
 interpret_stencil_expression (SCM expr,
-                              void (*func) (void *, SCM),
+                              SCM (*func) (void *, SCM),
                               void *func_arg,
                               Offset o)
 {
@@ -133,7 +133,7 @@ struct Font_list
   SCM fonts_;
 };
 
-static void
+static SCM
 find_font_function (void *fs, SCM x)
 {
   Font_list *me = (Font_list *) fs;
@@ -152,6 +152,7 @@ find_font_function (void *fs, SCM x)
             me->fonts_ = scm_cons (scm_cadr (what), me->fonts_);
         }
     }
+  return SCM_BOOL_T;
 }
 
 SCM
index e799f53a4a26dad39b49d6c8d00f1ca78b14823b..ab0f8cf745237b37cf36663ab93c0a6d884d3fa4 100644 (file)
@@ -315,10 +315,10 @@ struct Stencil_interpret_arguments
   SCM arg1;
 };
 
-void stencil_interpret_in_scm (void *p, SCM expr)
+SCM stencil_interpret_in_scm (void *p, SCM expr)
 {
   Stencil_interpret_arguments *ap = (Stencil_interpret_arguments *) p;
-  scm_call_2 (ap->func, ap->arg1, expr);
+  return scm_call_2 (ap->func, ap->arg1, expr);
 }
 
 LY_DEFINE (ly_interpret_stencil_expression, "ly:interpret-stencil-expression",