[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: markup commands leaks (Re: Scheme question on strict substitution)
From: |
Han-Wen Nienhuys |
Subject: |
Re: markup commands leaks (Re: Scheme question on strict substitution) |
Date: |
Thu, 28 Dec 2006 14:10:06 +0100 |
User-agent: |
Thunderbird 1.5.0.9 (X11/20061219) |
Nicolas Sceaux escreveu:
>> Still, the builtin-markup module should export its make-COMMAND-markup
>> and COMMAND-markup functions, for they are used in some of the files
>> loaded by lily.scm. As these functions will have to be imported in both
>> the (lily) modules and the toplevel .ly module, and also some other (scm
>> ...) modules, the namespace issue won't be solved anyhow.
>>
>> I propose that:
>>
>> 1) builtin markup commands are still defined in the (lily) module and
>> exported, using a `define-builtin-markup-command' macro;
>>
>> 2) user markup commands are defined in the toplevel ly module, by
>> creating a `define-markup-command' in markup-init.ly.
>
> I still have to check whether make web works, but is the following
> change OK? See markup.scm and markup-init.ly.
> diff --git a/ly/markup-init.ly b/ly/markup-init.ly
> new file mode 100644
> index 0000000..f2461e4
> --- /dev/null
> +++ b/ly/markup-init.ly
> + (let ((command-proc (toplevel-module-ref ',command-name)))
> + ;; register its command signature
> + (set! (markup-command-signature command-proc)
> + (list ,@signature))
hi, this statement still leaks memory. I think the signature hashtab should
be thrown away or put into the local module as well.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
LilyPond Software Design
-- Code for Music Notation
http://www.lilypond-design.com