[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: global-context-scheme cleanup
From: |
Han-Wen Nienhuys |
Subject: |
Re: global-context-scheme cleanup |
Date: |
Sat, 08 Jul 2006 12:26:13 +0200 |
User-agent: |
Thunderbird 1.5.0.4 (X11/20060614) |
Erik Sandberg schreef:
Hi,
The attached patch performs a number of cleanups:
1. ly:run-translator is split up into three separate functions.
2. get_output is eliminated; instead, score-level translators set a context
property 'output in the score context.
3. (2) eliminates the need for the Score_translator and Score_context classes,
so they are junked.
good.
While (2) makes an improvement over the previous situation, I'm still not
satisfied: I'd like to keep the output in translators, and then rewrite all
uses of ly:run-translator to extract output from the translators instead.
I don't understand this remark completely.
does this patch depend on the other one (I just commented on)?
if not, please apply after verifying that make web still works.
+(define (ly:make-translator-context od key)
+ (let ((glob (ly:make-global-context od key)))
+ (ly:make-global-translator glob)
+ glob))
+
+(define-public (run-translator mus od key)
+ (ly:interpret-music-expression mus (ly:make-translator-context od key)))
i'm not a fan of these 2 line excursions to scheme from C++. Why not
call ly_make_translator_context directly from ly:run-translator
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
LilyPond Software Design
-- Code for Music Notation
http://www.lilypond-design.com