X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-package.lisp;h=be3cbd1fd5b1867b9266c3b7856f255903b1e9b7;hb=416152f084604094445a758ff399871132dff2bd;hp=24149ee5799d30a26a5fdbfad9c93ed9faaf3aa2;hpb=1513b29bfbe948e7b431b5f67f1ff10769c192cf;p=sbcl.git diff --git a/src/code/target-package.lisp b/src/code/target-package.lisp index 24149ee..be3cbd1 100644 --- a/src/code/target-package.lisp +++ b/src/code/target-package.lisp @@ -91,21 +91,22 @@ (def-frob package-used-by-list package-%used-by-list) (def-frob package-shadowing-symbols package-%shadowing-symbols)) -(flet ((stuff (table) - (let ((size (the fixnum - (- (the fixnum (package-hashtable-size table)) - (the fixnum - (package-hashtable-deleted table)))))) - (declare (fixnum size)) - (values (the fixnum - (- size - (the fixnum - (package-hashtable-free table)))) - size)))) - (defun package-internal-symbol-count (package) - (stuff (package-internal-symbols package))) - (defun package-external-symbol-count (package) - (stuff (package-external-symbols package)))) +(defun %package-hashtable-symbol-count (table) + (let ((size (the fixnum + (- (the fixnum (package-hashtable-size table)) + (the fixnum + (package-hashtable-deleted table)))))) + (declare (fixnum size)) + (the fixnum + (- size + (the fixnum + (package-hashtable-free table)))))) + +(defun package-internal-symbol-count (package) + (%package-hashtable-symbol-count (package-internal-symbols package))) + +(defun package-external-symbol-count (package) + (%package-hashtable-symbol-count (package-external-symbols package))) (defvar *package* (error "*PACKAGE* should be initialized in cold load!") #!+sb-doc "the current package")