X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdefpackage.lisp;h=3e76f63534485290eb79cf174a61b393d6376dda;hb=2c9e9cdf20257c422cd43bd30b89990499bca475;hp=ff3037c0e9289d6d1408c85a6c62bbaab7c08b4a;hpb=e59ce23faa19fe7995e59186c114e865ce3bfcd1;p=sbcl.git diff --git a/src/code/defpackage.lisp b/src/code/defpackage.lisp index ff3037c..3e76f63 100644 --- a/src/code/defpackage.lisp +++ b/src/code/defpackage.lisp @@ -212,7 +212,7 @@ implement lock doc-string) (declare #!-sb-package-locks (ignore implement lock)) - (enter-new-nicknames package nicknames) + (%enter-new-nicknames package nicknames) ;; 1. :shadow and :shadowing-import-from ;; ;; shadows is a list of strings, shadowing-imports is a list of symbols. @@ -299,25 +299,26 @@ (type (or simple-string null) doc-string) #!-sb-package-locks (ignore implement lock)) - (let* ((existing-package (find-package name)) - (use (use-list-packages existing-package use)) - (shadowing-imports (import-list-symbols shadowing-imports)) - (imports (import-list-symbols imports))) - (if existing-package - (update-package-with-variance existing-package name - nicknames source-location - shadows shadowing-imports - use imports interns exports - implement lock doc-string) - (let ((package (make-package name - :use nil - :internal-symbols (or size 10) - :external-symbols (length exports)))) - (update-package package - nicknames source-location - shadows shadowing-imports - use imports interns exports - implement lock doc-string))))) + (with-package-graph () + (let* ((existing-package (find-package name)) + (use (use-list-packages existing-package use)) + (shadowing-imports (import-list-symbols shadowing-imports)) + (imports (import-list-symbols imports))) + (if existing-package + (update-package-with-variance existing-package name + nicknames source-location + shadows shadowing-imports + use imports interns exports + implement lock doc-string) + (let ((package (make-package name + :use nil + :internal-symbols (or size 10) + :external-symbols (length exports)))) + (update-package package + nicknames source-location + shadows shadowing-imports + use imports interns exports + implement lock doc-string)))))) (defun find-or-make-symbol (name package) (multiple-value-bind (symbol how) (find-symbol name package)