diff options
author | Ludovic Court`es | 2006-03-02 09:17:41 +0000 |
---|---|---|
committer | Ludovic Court`es | 2006-03-02 09:17:41 +0000 |
commit | 7a234de08a024d77d32c7f4784d1e40c06a6893a (patch) | |
tree | 2eab1e85d8f28229b8e36f3e4b50684e970ba165 /src | |
parent | 3fe02d51a069386687014825e626679d69d03d22 (diff) | |
download | skribilo-7a234de08a024d77d32c7f4784d1e40c06a6893a.tar.gz skribilo-7a234de08a024d77d32c7f4784d1e40c06a6893a.tar.lz skribilo-7a234de08a024d77d32c7f4784d1e40c06a6893a.zip |
Fixed `copy-engine' with respect to the writers optimization.
* src/guile/skribilo/engine.scm (copy-engine): Fixed so that the
`writers' hash table is actually copied.
git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-66
Diffstat (limited to 'src')
-rw-r--r-- | src/guile/skribilo/engine.scm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/guile/skribilo/engine.scm b/src/guile/skribilo/engine.scm index fbaf4d2..de455cd 100644 --- a/src/guile/skribilo/engine.scm +++ b/src/guile/skribilo/engine.scm @@ -207,6 +207,17 @@ (slot-set! new 'symbol-table (or symbol-table (slot-ref e 'symbol-table))) (slot-set! new 'customs (or custom (slot-ref e 'customs))) + ;; XXX: We don't use `list-copy' here because writer lists are only + ;; consed, never mutated. + + ;(slot-set! new 'free-writers (list-copy (slot-ref e 'free-writers))) + + (let ((new-writers (make-hash-table))) + (hash-for-each (lambda (m w*) + (hashq-set! new-writers m w*)) + (slot-ref e 'writers)) + (slot-set! new 'writers new-writers)) + (set! *engines* (cons new *engines*)) new)) |