Mercurial > emacs
changeset 17021:35f01092d865
(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.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 20 Feb 1997 06:43:51 +0000 |
parents | 5cf5e7c9fe55 |
children | 907fb167f7de |
files | src/alloc.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alloc.c Thu Feb 20 06:43:16 1997 +0000 +++ b/src/alloc.c Thu Feb 20 06:43:51 1997 +0000 @@ -778,7 +778,8 @@ 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 @@ 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;