summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1997-02-20 06:43:51 +0000
committerKarl Heuer <kwzh@gnu.org>1997-02-20 06:43:51 +0000
commitc0d6a3a1cf4ebd99e62fddcefd01f32720510302 (patch)
tree77dae0a1d46f3ae382d7401a151d4b74648bbc5f /src/alloc.c
parent28e9aa38bc76c293294e687d38d48d7b8a4e57ce (diff)
downloademacs-c0d6a3a1cf4ebd99e62fddcefd01f32720510302.tar.gz
(Fmake_char_table): Typo in doc-string fixed. Handle
the case that PURPOSE is nil (in a deeper char-table). (Fmake_bool_vector): Make correct size of Lisp_Object for bool-vector.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index ad7e6beb4a3..41857cfba93 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -778,7 +778,8 @@ The property's value should be an integer between 0 and 10.")
Lisp_Object vector;
Lisp_Object n;
CHECK_SYMBOL (purpose, 1);
- n = Fget (purpose, Qchar_table_extra_slots);
+ /* For a deeper char-table, PURPOSE can be nil. */
+ n = NILP (purpose) ? 0 : Fget (purpose, Qchar_table_extra_slots);
CHECK_NUMBER (n, 0);
if (XINT (n) < 0 || XINT (n) > 10)
args_out_of_range (n, Qnil);
@@ -1107,7 +1108,9 @@ Both LENGTH and INIT must be numbers. INIT matters only in whether it is t or n
length_in_elts = (XFASTINT (length) + bits_per_value - 1) / bits_per_value;
length_in_chars = length_in_elts * sizeof (EMACS_INT);
- val = Fmake_vector (make_number (length_in_elts), Qnil);
+ /* We must allocate one more elements than LENGTH_IN_ELTS for the
+ slot `size' of the struct Lisp_Bool_Vector. */
+ val = Fmake_vector (make_number (length_in_elts + 1), Qnil);
p = XBOOL_VECTOR (val);
/* Get rid of any bits that would cause confusion. */
p->vector_size = 0;