From 0328dfdc99168708d47e4c4fd6a86200506091ee Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Wed, 3 Apr 2013 13:05:17 +0200 Subject: [PATCH] Use call-after-session to clear out hashes per session at an obvious place. --- ly/declarations-init.ly | 7 +++++++ ly/init.ly | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ly/declarations-init.ly b/ly/declarations-init.ly index f37103c9a9..0ffc57a578 100644 --- a/ly/declarations-init.ly +++ b/ly/declarations-init.ly @@ -38,6 +38,10 @@ maxima = #(ly:make-duration -3 0) #(define default-fret-table (make-hash-table 101)) #(define chord-shape-table (make-hash-table 29)) +#(call-after-session + (lambda () + (hash-clear! default-fret-table) + (hash-clear! chord-shape-table))) % declarations for standard directions left = #-1 @@ -96,6 +100,9 @@ repeatTie = #(make-music 'RepeatTieEvent) %% MAKE-HASH-TABLE in GUILE 1.6 takes mandatory size parameter. #(define musicQuotes (make-hash-table 29)) +#(call-after-session + (lambda () + (hash-clear! musicQuotes))) #(define toplevel-book-handler print-book-with-defaults) #(define toplevel-bookpart-handler collect-bookpart-for-book) diff --git a/ly/init.ly b/ly/init.ly index 3be64edb7f..7dbb1042aa 100644 --- a/ly/init.ly +++ b/ly/init.ly @@ -29,9 +29,6 @@ #(define expect-error #f) #(define output-empty-score-list #f) #(define output-suffix #f) -#(hash-clear! default-fret-table) -#(hash-clear! chord-shape-table) -#(hash-clear! musicQuotes) #(use-modules (scm clip-region)) #(use-modules (srfi srfi-1)) -- 2.39.2