[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pkg 90c070fec6 59/76: Restore obarray.el to return vectors
From: |
Gerd Moellmann |
Subject: |
pkg 90c070fec6 59/76: Restore obarray.el to return vectors |
Date: |
Fri, 21 Oct 2022 00:16:14 -0400 (EDT) |
branch: pkg
commit 90c070fec6ee9b1832adfef54f1b87d480478bdc
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Restore obarray.el to return vectors
---
lisp/obarray.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/lisp/obarray.el b/lisp/obarray.el
index e335c66d51..604314d357 100644
--- a/lisp/obarray.el
+++ b/lisp/obarray.el
@@ -32,16 +32,19 @@
(defun obarray-make (&optional size)
"Return a new obarray of size SIZE or `obarray-default-size'."
- (make-%package "obarray" (or size 31)))
+ (let ((size (or size obarray-default-size)))
+ (if (< 0 size)
+ (make-vector size 0)
+ (signal 'wrong-type-argument '(size 0)))))
-(defun obarray-size (_ob)
+(defun obarray-size (ob)
"Return the number of slots of obarray OB."
- obarray-default-size)
+ (length ob))
(defun obarrayp (object)
"Return t if OBJECT is an obarray."
- (or (packagep object)
- (vectorp object)))
+ (and (vectorp object)
+ (< 0 (length object))))
;; Don’t use obarray as a variable name to avoid shadowing.
(defun obarray-get (ob name)
- pkg 2ed1ac6639 09/76: Fixing stuff, (continued)
- pkg 2ed1ac6639 09/76: Fixing stuff, Gerd Moellmann, 2022/10/21
- pkg 1d02e7a48b 02/76: Add xprint command, Gerd Moellmann, 2022/10/21
- pkg a3f99fde48 22/76: Remove Lisp_Symbol::next pointer, Gerd Moellmann, 2022/10/21
- pkg 2518bc249c 39/76: Fix printing symbols, Gerd Moellmann, 2022/10/21
- pkg bbb2609103 40/76: Recognize vectors as obarrays, Gerd Moellmann, 2022/10/21
- pkg 76d59f8a03 60/76: Fix missing ')', Gerd Moellmann, 2022/10/21
- pkg 73b617eaa9 64/76: Change package symbol table layout, Gerd Moellmann, 2022/10/21
- pkg 0976c09890 37/76: Fix printing of confusing symbol names, Gerd Moellmann, 2022/10/21
- pkg aaf12c12b6 32/76: Some scribbling, Gerd Moellmann, 2022/10/21
- pkg 963de7cafe 35/76: More scribbling, Gerd Moellmann, 2022/10/21
- pkg 90c070fec6 59/76: Restore obarray.el to return vectors,
Gerd Moellmann <=
- pkg 74da61ff09 74/76: Remove a call to pkg_break, Gerd Moellmann, 2022/10/21
- pkg cc6095482b 73/76: Add pkg_set_status and Lisp defun for it, Gerd Moellmann, 2022/10/21
- pkg 7acb6c5ca1 68/76: Intrdduce pkg_find_symbol, Gerd Moellmann, 2022/10/21
- pkg 55cef2c78c 69/76: Some cleanup in pkg.c and lisp.h, Gerd Moellmann, 2022/10/21
- pkg df1e4c1e51 34/76: Allow intern with ":xyz" again, Gerd Moellmann, 2022/10/21
- pkg 513f5a0b90 21/76: Remove obarrays, Gerd Moellmann, 2022/10/21
- pkg 051a17f540 63/76: Fix some warnings, Gerd Moellmann, 2022/10/21
- pkg 0f4b419fa3 65/76: Remove unused function prototype from lisp.h, Gerd Moellmann, 2022/10/21
- pkg adf7b760f2 12/76: More symbol reading, Gerd Moellmann, 2022/10/21
- pkg e2b79c2c5a 14/76: Revert the escaping of symbol names in lisp files, Gerd Moellmann, 2022/10/21