alist->env didn't work, because it was passing a list, not a vector,

to the %INSTALL-ENV procedure. Reported by Mike Sperber 9/19/96.
This commit is contained in:
shivers 1996-09-19 22:22:46 +00:00
parent d15cfee879
commit 2ecccd3546
2 changed files with 9 additions and 6 deletions

View File

@ -28,3 +28,6 @@ I changed the meta-arg parser (C, Scheme, and doc) so that newline
autoreap-policy's optional arg wasn't optional -- the dot was missing.
Reported by rthappe@mathematik.uni-freiburg.DE (Rolf-Thomas Happe).
alist->env didn't work, because it was passing a list, not a vector,
to the %INSTALL-ENV procedure. Reported by Mike Sperber 9/19/96.

View File

@ -90,8 +90,7 @@
(define (%exec prog arg-list env)
(let ((argv (mapv! stringify (list->vector arg-list)))
(prog (stringify prog))
(env (if (eq? env #t) #t
(list->vector (alist->env-list env)))))
(env (if (eq? env #t) #t (alist->env-vec env))))
(%%exec prog argv env)))
@ -879,9 +878,10 @@
cons))
env-list))
(define (alist->env-list alist)
(map (lambda (var.val) (string-append (car var.val) "=" (cdr var.val)))
alist))
(define (alist->env-vec alist)
(list->vector (map (lambda (var.val)
(string-append (car var.val) "=" (cdr var.val)))
alist)))
;;; ENV->ALIST
@ -904,7 +904,7 @@
(define-errno-syscall (%install-env env-vec) %install-env/errno)
(define (alist->env alist)
(%install-env (alist->env-list alist)))
(%install-env (alist->env-vec alist)))
;;; GETENV, PUTENV, SETENV