(defun obarray-make (&optional size)
"Return a new obarray of size SIZE or `obarray-default-size'."
- (let ((size (or size obarray-default-size)))
- (if (< 0 size)
- (make-vector size 0)
- (signal 'wrong-type-argument '(size 0)))))
+ (make-package "obarray"))
(defun obarray-size (ob)
"Return the number of slots of obarray OB."
- (length ob))
+ obarray-default-size)
(defun obarrayp (object)
"Return t if OBJECT is an obarray."
- (and (vectorp object)
- (< 0 (length object))))
+ (packagep object))
;; Don’t use obarray as a variable name to avoid shadowing.
(defun obarray-get (ob name)
(mapatoms fn ob))
(provide 'obarray)
+
;;; obarray.el ends here