if (n != ASIZE (seq))
{
- struct Lisp_Vector *p = allocate_vectorlike (n);
+ struct Lisp_Vector *p = allocate_vector (n);
for (i = n = 0; i < ASIZE (seq); ++i)
if (NILP (Fequal (AREF (seq, i), elt)))
p->contents[n++] = AREF (seq, i);
- p->size = n;
XSETVECTOR (seq, p);
}
}
old_size = XVECTOR (vec)->size;
xassert (new_size >= old_size);
- v = allocate_vectorlike (new_size);
- v->size = new_size;
+ v = allocate_vector (new_size);
bcopy (XVECTOR (vec)->contents, v->contents,
old_size * sizeof *v->contents);
for (i = old_size; i < new_size; ++i)
Lisp_Object user_test, user_hash;
{
struct Lisp_Hash_Table *h;
- struct Lisp_Vector *v;
Lisp_Object table;
- int index_size, i, len, sz;
+ int index_size, i, sz;
/* Preconditions. */
xassert (SYMBOLP (test));
if (XFASTINT (size) == 0)
size = make_number (1);
- /* Allocate a vector, and initialize it. */
- len = VECSIZE (struct Lisp_Hash_Table);
- v = allocate_vectorlike (len);
- v->size = len;
- for (i = 0; i < len; ++i)
- v->contents[i] = Qnil;
+ /* Allocate a table and initialize it. */
+ h = allocate_hash_table ();
/* Initialize hash table slots. */
sz = XFASTINT (size);
- h = (struct Lisp_Hash_Table *) v;
h->test = test;
if (EQ (test, Qeql))
Lisp_Object table;
struct Lisp_Hash_Table *h2;
struct Lisp_Vector *v, *next;
- int len;
- len = VECSIZE (struct Lisp_Hash_Table);
- v = allocate_vectorlike (len);
- h2 = (struct Lisp_Hash_Table *) v;
+ h2 = allocate_hash_table ();
next = h2->vec_next;
bcopy (h1, h2, sizeof *h2);
h2->vec_next = next;