(values symbol nil))))))))
;;; Check internal and external symbols, then scan down the list
-;;; of hashtables for inherited symbols. When an inherited symbol
-;;; is found pull that table to the beginning of the list.
+;;; of hashtables for inherited symbols.
(defun find-symbol* (string length package)
(declare (simple-string string)
(type index length))
((null table) (values nil nil))
(with-symbol (found symbol (car table) string length hash ehash)
(when found
- (unless (eq prev head)
- (shiftf (cdr prev) (cdr table) (cdr head) table))
+ ;; At this point we used to move the table to the
+ ;; beginning of the list, probably on the theory that we'd
+ ;; soon be looking up further items there. Unfortunately
+ ;; that was very much non-thread safe. Since the failure
+ ;; mode was nasty (corruption of the package in a way
+ ;; which would make symbol lookups loop infinitely) and it
+ ;; would be triggered just by doing reads to a resource
+ ;; that users can't do their own locking on, that code has
+ ;; been removed. If we ever add locking to packages,
+ ;; resurrecting that code might make sense, even though it
+ ;; didn't seem to have much of an performance effect in
+ ;; normal use.
+ ;;
+ ;; -- JES, 2006-09-13
(return-from find-symbol* (values symbol :inherited))))))))
;;; Similar to FIND-SYMBOL, but only looks for an external symbol.
:interactive
(lambda ()
(let* ((len (length symbols))
- (nlen (length (write-to-string len :base 10))))
+ (nlen (length (write-to-string len :base 10)))
+ (*print-pretty* t))
(format *query-io* "~&~@<Select a symbol to be made accessible in ~
package ~A:~2I~@:_~{~{~V,' D. ~S~}~@:_~}~@:>"
(package-name package)