Function: make-bool-vector

make-bool-vector is a function defined in alloc.c.

Signature

(make-bool-vector LENGTH INIT)

Documentation

Return a new bool-vector of length LENGTH, using INIT for each element.

LENGTH must be a number. INIT matters only in whether it is t or nil.

View in manual

Probably introduced at or before Emacs version 19.30.

Source Code

// Defined in /usr/src/emacs/src/alloc.c
{
  CHECK_FIXNAT (length);
  EMACS_INT len = XFIXNAT (length);
  if (BOOL_VECTOR_LENGTH_MAX < len)
    memory_full (SIZE_MAX);
  Lisp_Object val = make_clear_bool_vector (len, NILP (init));
  return NILP (init) ? val : bool_vector_fill (val, init);
}