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

allow `apply' on %nil-terminated lists

* libguile/vm-engine.h (PUSH_LIST): Add a parameter to check that the
  list was proper.

* libguile/vm-i-system.c: Adapt PUSH_LIST callsites to pass SCM_NULLP or
  SCM_NULL_OR_NIL_P, as appropriate. Add a check to return/values*.

* libguile/vm.c: Add lang.h header for SCM_NULL_OR_NIL_P.

* test-suite/tests/elisp.test: Fix XFAIL for elisp + apply.
This commit is contained in:
Andy Wingo 2009-01-04 14:06:52 +01:00
parent b1b942b74c
commit fb10a0084e
4 changed files with 15 additions and 14 deletions

View file

@ -341,12 +341,8 @@
(elisp-pass-if '(function (lambda (x y &optional o &rest r) (list x y o r))) "(lambda (x y &optional o &rest r) (list x y o r))")
(elisp-pass-if '(funcall (lambda (x y &optional o &rest r) (list x y o r)) 1 2 3 4) "(1 2 3 (4))")
;; If r4rs.scm is compiled, `apply' will only unroll true scheme
;; lists.
(elisp-pass-if/maybe-error
'vm-error
'(apply (lambda (x y &optional o &rest r) (list x y o r)) 1 2 3 nil)
"(1 2 3 #nil)")
(elisp-pass-if '(apply (lambda (x y &optional o &rest r) (list x y o r)) 1 2 3 nil)
"(1 2 3 #nil)")
(elisp-pass-if '(setq x 3) "3")
(elisp-pass-if '(defvar x 4) "x")