1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-21 03:00:19 +02:00

factor copy-tree and cons-source out of eval.[ch]

* libguile.h:
* libguile/Makefile.am
* libguile/init.c (scm_i_init_guile): Add trees.[ch] to the build.

* libguile/eval.c:
* libguile/eval.h: Remove scm_copy_tree and scm_cons_source...

* libguile/trees.h:
* libguile/trees.c:
* libguile/srcprop.h:
* libguile/srcprop.c: ... factoring them out here and here,
  respectively.

* test-suite/tests/eval.test ("memoization"): Change expected exception
  for circular data structures, given new copy-tree location.
This commit is contained in:
Andy Wingo 2009-11-27 23:12:35 +01:00
parent 504864b79f
commit 0f458a3725
11 changed files with 286 additions and 184 deletions

View file

@ -51,7 +51,7 @@
(equal? bar '(#t . #(#t)))))
(pass-if-exception "circular lists in forms"
exception:bad-expression
exception:wrong-type-arg
(let ((foo (list #f)))
(set-cdr! foo foo)
(copy-tree foo))))
@ -157,7 +157,7 @@
(with-test-prefix "scm_tc7_subr_2o"
;; prior to guile 1.6.9 and 1.8.1 this called the function with
;; SCM_UNDEFIEND, which in the case of make-vector resulted in
;; SCM_UNDEFINED, which in the case of make-vector resulted in
;; wrong-type-arg, instead of the intended wrong-num-args
(pass-if-exception "0 args" exception:wrong-num-args
(apply make-vector '()))