X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Ftarget-package.lisp;h=d4876eff603ea3a5444f0d05a081bb5ecd011729;hb=496071a75429677a2c064e4995c379d3ba6ec458;hp=2e5bef5dbad7e24e3cacb93d5f85b5520420321a;hpb=4c09711eca1c33e60ff30a8f47f9c03b429d5994;p=sbcl.git diff --git a/src/code/target-package.lisp b/src/code/target-package.lisp index 2e5bef5..d4876ef 100644 --- a/src/code/target-package.lisp +++ b/src/code/target-package.lisp @@ -46,7 +46,8 @@ ;;; core image (defconstant +package-hashtable-image-load-factor+ 0.5) -;;; All destructive package modifications are serialized on this lock. +;;; All destructive package modifications are serialized on this lock, +;;; plus iterations on *PACKAGE-NAMES*. (defvar *package-lock*) (!cold-init-forms @@ -690,10 +691,11 @@ implementation it is ~S." *default-package-use-list*) #!+sb-doc "Return a list of all existing packages." (let ((res ())) - (maphash (lambda (k v) - (declare (ignore k)) - (pushnew v res)) - *package-names*) + (with-packages () + (maphash (lambda (k v) + (declare (ignore k)) + (pushnew v res)) + *package-names*)) res)) (defun intern (name &optional (package (sane-package))) @@ -1300,11 +1302,12 @@ PACKAGE." "Return a list of all symbols in the system having the specified name." (let ((string (string string-or-symbol)) (res ())) - (maphash (lambda (k v) - (declare (ignore k)) - (multiple-value-bind (s w) (find-symbol string v) - (when w (pushnew s res)))) - *package-names*) + (with-packages () + (maphash (lambda (k v) + (declare (ignore k)) + (multiple-value-bind (s w) (find-symbol string v) + (when w (pushnew s res)))) + *package-names*)) res)) ;;;; APROPOS and APROPOS-LIST