1.0.48.31: WITH-LOCKED-SYSTEM-TABLE
[sbcl.git] / src / code / target-package.lisp
index ccaa5bb..4569a11 100644 (file)
@@ -75,7 +75,7 @@
 
 (defmacro with-package-names ((names &key) &body body)
   `(let ((,names *package-names*))
-     (with-locked-hash-table (,names)
+     (with-locked-system-table (,names)
        ,@body)))
 \f
 ;;;; PACKAGE-HASHTABLE stuff
@@ -599,7 +599,7 @@ implementation it is ~S." *default-package-use-list*)
        (cerror "Clobber existing package."
                "A package named ~S already exists" name)
        (setf clobber t))
-     (with-packages ()
+     (with-package-graph ()
        ;; Check for race, signal the error outside the lock.
        (when (and (not clobber) (find-package name))
          (go :restart))
@@ -967,8 +967,8 @@ uninterned."
                 (remove symbol shadowing-symbols)))
 
         (multiple-value-bind (s w) (find-symbol name package)
-          (declare (ignore s))
-          (cond ((or (eq w :internal) (eq w :external))
+          (cond ((not (eq symbol s)) nil)
+                ((or (eq w :internal) (eq w :external))
                  (nuke-symbol (if (eq w :internal)
                                   (package-internal-symbols package)
                                   (package-external-symbols package))