summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-07-10 10:49:01 +0200
committerAndy Wingo <wingo@pobox.com>2010-07-10 10:49:01 +0200
commit2b12193df297be2051e816def21f75bfd358c8db (patch)
tree2047f20205b6e764d9b66dc3a5f62173f54435d2
parenta38dd31ffc2855cd3c2cbe4659a6cc6398d07cc5 (diff)
downloadguile-2b12193df297be2051e816def21f75bfd358c8db.tar.gz
heap/literal fixes for repl-default-options
* module/system/repl/common.scm (repl-default-options): Heap-allocate the repl-default-options, to avoid mutating a literal. (make-repl): Copy repl-default-options.
-rw-r--r--module/system/repl/common.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/module/system/repl/common.scm b/module/system/repl/common.scm
index 9d71e9939..0c42ea7dd 100644
--- a/module/system/repl/common.scm
+++ b/module/system/repl/common.scm
@@ -104,14 +104,15 @@ See <http://www.gnu.org/licenses/lgpl.html>, for more details.")
language options tm-stats gc-stats inport outport debug)
(define repl-default-options
- '((compile-options . (#:warnings (unbound-variable arity-mismatch)))
- (trace . #f)
- (interp . #f)))
+ (copy-tree
+ '((compile-options . (#:warnings (unbound-variable arity-mismatch)))
+ (trace . #f)
+ (interp . #f))))
(define %make-repl make-repl)
(define* (make-repl lang #:optional debug)
(%make-repl #:language (lookup-language lang)
- #:options repl-default-options
+ #:options (copy-tree repl-default-options)
#:tm-stats (times)
#:gc-stats (gc-stats)
#:inport (current-input-port)