/* The only vector with 0 slots, allocated from pure space. */
-static struct Lisp_Vector *zero_vector;
+Lisp_Object zero_vector;
/* Get a new vector block. */
static void
init_vectors (void)
{
- zero_vector = pure_alloc (header_size, Lisp_Vectorlike);
- zero_vector->header.size = 0;
+ zero_vector = make_pure_vector (0);
}
/* Allocate vector from a vector block. */
/* eassert (!handling_signal); */
if (len == 0)
- p = zero_vector;
+ p = XVECTOR (zero_vector);
else
{
size_t nbytes = header_size + len * word_size;
/* Unicode category `Cf'. */
static Lisp_Object QCf;
-/* Special vector of zero length. This is repeatedly used by (struct
- font_driver *)->list when a specified font is not found. */
-static Lisp_Object null_vector;
-
/* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */
static Lisp_Object font_style_table;
val = driver_list->driver->list (frame, scratch_font_spec);
if (NILP (val))
- val = null_vector;
+ val = zero_vector;
else
val = Fvconcat (1, &val);
copy = copy_font_spec (scratch_font_spec);
{
registry[0] = DEFAULT_ENCODING;
registry[1] = Qascii_0;
- registry[2] = null_vector;
+ registry[2] = zero_vector;
}
else
- registry[1] = null_vector;
+ registry[1] = zero_vector;
if (c >= 0 && ! NILP (AREF (spec, FONT_REGISTRY_INDEX)))
{
ASET (work, FONT_SIZE_INDEX, Qnil);
foundry[0] = AREF (work, FONT_FOUNDRY_INDEX);
if (! NILP (foundry[0]))
- foundry[1] = null_vector;
+ foundry[1] = zero_vector;
else if (STRINGP (attrs[LFACE_FOUNDRY_INDEX]))
{
val = attrs[LFACE_FOUNDRY_INDEX];
foundry[0] = font_intern_prop (SSDATA (val), SBYTES (val), 1);
foundry[1] = Qnil;
- foundry[2] = null_vector;
+ foundry[2] = zero_vector;
}
else
- foundry[0] = Qnil, foundry[1] = null_vector;
+ foundry[0] = Qnil, foundry[1] = zero_vector;
adstyle[0] = AREF (work, FONT_ADSTYLE_INDEX);
if (! NILP (adstyle[0]))
- adstyle[1] = null_vector;
+ adstyle[1] = zero_vector;
else if (FONTP (attrs[LFACE_FONT_INDEX]))
{
Lisp_Object face_font = attrs[LFACE_FONT_INDEX];
{
adstyle[0] = AREF (face_font, FONT_ADSTYLE_INDEX);
adstyle[1] = Qnil;
- adstyle[2] = null_vector;
+ adstyle[2] = zero_vector;
}
else
- adstyle[0] = Qnil, adstyle[1] = null_vector;
+ adstyle[0] = Qnil, adstyle[1] = zero_vector;
}
else
- adstyle[0] = Qnil, adstyle[1] = null_vector;
+ adstyle[0] = Qnil, adstyle[1] = zero_vector;
val = AREF (work, FONT_FAMILY_INDEX);
{
family = alloca ((sizeof family[0]) * 2);
family[0] = Qnil;
- family[1] = null_vector; /* terminator. */
+ family[1] = zero_vector; /* terminator. */
}
else
{
family[i] = XCAR (alters);
if (NILP (AREF (spec, FONT_FAMILY_INDEX)))
family[i++] = Qnil;
- family[i] = null_vector;
+ family[i] = zero_vector;
}
else
{
family[i++] = val;
if (NILP (AREF (spec, FONT_FAMILY_INDEX)))
family[i++] = Qnil;
- family[i] = null_vector;
+ family[i] = zero_vector;
}
}
DEFSYM (QCuser_spec, "user-spec");
- staticpro (&null_vector);
- null_vector = Fmake_vector (make_number (0), Qnil);
-
staticpro (&scratch_font_spec);
scratch_font_spec = Ffont_spec (0, NULL);
staticpro (&scratch_font_prefer);