Commit 77b37c05 authored by Paul Eggert's avatar Paul Eggert
Browse files

* lisp.h: (XVECTOR_SIZE): Remove. All uses replaced with ASIZE.

(ASIZE): Now contains previous implementation of XVECTOR_SIZE
instead of invoking XVECTOR_SIZE.
parent b102ceb1
2011-04-25 Paul Eggert <eggert@cs.ucla.edu>
* lisp.h: (XVECTOR_SIZE): Remove. All uses replaced with ASIZE.
(ASIZE): Now contains previous implementation of XVECTOR_SIZE
instead of invoking XVECTOR_SIZE.
* lisp.h: Say "vectorlike header" rather than "vector header.
(struct vectorlike_header): Rename from struct vector_header.
(XVECTORLIKE_HEADER_SIZE): Renamed from XVECTOR_HEADER_SIZE.
......
......@@ -4772,7 +4772,7 @@ Does not copy symbols. Copies strings without text properties. */)
register EMACS_INT i;
EMACS_INT size;
size = XVECTOR_SIZE (obj);
size = ASIZE (obj);
if (size & PSEUDOVECTOR_FLAG)
size &= PSEUDOVECTOR_SIZE_MASK;
vec = XVECTOR (make_pure_vector (size));
......
......@@ -4178,7 +4178,7 @@ static int last_overlay_modification_hooks_used;
static void
add_overlay_mod_hooklist (Lisp_Object functionlist, Lisp_Object overlay)
{
int oldsize = XVECTOR_SIZE (last_overlay_modification_hooks);
int oldsize = ASIZE (last_overlay_modification_hooks);
if (last_overlay_modification_hooks_used == oldsize)
last_overlay_modification_hooks = larger_vector
......
......@@ -467,7 +467,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
CHECK_NUMBER (maxdepth);
#ifdef BYTE_CODE_SAFE
const_length = XVECTOR_SIZE (vector);
const_length = ASIZE (vector);
#endif
if (STRING_MULTIBYTE (bytestr))
......
......@@ -293,7 +293,7 @@ invoke it. If KEYS is omitted or nil, the return value of
else
{
CHECK_VECTOR (keys);
key_count = XVECTOR_SIZE (keys);
key_count = ASIZE (keys);
}
/* Save this now, since use of minibuffer will clobber it. */
......
......@@ -357,7 +357,7 @@ c_string_width (const unsigned char *str, EMACS_INT len, int precision,
{
val = DISP_CHAR_VECTOR (dp, c);
if (VECTORP (val))
thiswidth = XVECTOR_SIZE (val);
thiswidth = ASIZE (val);
else
thiswidth = CHAR_WIDTH (c);
}
......@@ -446,7 +446,7 @@ lisp_string_width (Lisp_Object string, int precision,
{
val = DISP_CHAR_VECTOR (dp, c);
if (VECTORP (val))
thiswidth = XVECTOR_SIZE (val);
thiswidth = ASIZE (val);
else
thiswidth = CHAR_WIDTH (c);
}
......
......@@ -7125,7 +7125,7 @@ handle_composition_annotation (EMACS_INT pos, EMACS_INT limit,
components = COMPOSITION_COMPONENTS (prop);
if (VECTORP (components))
{
len = XVECTOR_SIZE (components);
len = ASIZE (components);
for (i = 0; i < len; i++)
*buf++ = XINT (AREF (components, i));
}
......
......@@ -293,7 +293,7 @@ get_composition_id (EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT nchars,
}
else if (VECTORP (components) || CONSP (components))
{
EMACS_UINT len = XVECTOR_SIZE (key);
EMACS_UINT len = ASIZE (key);
/* The number of elements should be odd. */
if ((len % 2) == 0)
......@@ -326,8 +326,8 @@ get_composition_id (EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT nchars,
: COMPOSITION_WITH_RULE_ALTCHARS));
cmp->hash_index = hash_index;
glyph_len = (cmp->method == COMPOSITION_WITH_RULE_ALTCHARS
? (XVECTOR_SIZE (key) + 1) / 2
: XVECTOR_SIZE (key));
? (ASIZE (key) + 1) / 2
: ASIZE (key));
cmp->glyph_len = glyph_len;
cmp->offsets = (short *) xmalloc (sizeof (short) * glyph_len * 2);
cmp->font = NULL;
......
......@@ -2093,9 +2093,9 @@ or a byte-code object. IDX starts at 0. */)
{
int size = 0;
if (VECTORP (array))
size = XVECTOR_SIZE (array);
size = ASIZE (array);
else if (COMPILEDP (array))
size = XVECTOR_SIZE (array) & PSEUDOVECTOR_SIZE_MASK;
size = ASIZE (array) & PSEUDOVECTOR_SIZE_MASK;
else
wrong_type_argument (Qarrayp, array);
......@@ -2120,7 +2120,7 @@ bool-vector. IDX starts at 0. */)
if (VECTORP (array))
{
if (idxval < 0 || idxval >= XVECTOR_SIZE (array))
if (idxval < 0 || idxval >= ASIZE (array))
args_out_of_range (array, idx);
XVECTOR (array)->contents[idxval] = newelt;
}
......
......@@ -6073,7 +6073,7 @@ pass nil for VARIABLE. */)
state = frame_and_buffer_state;
vecp = XVECTOR (state)->contents;
end = vecp + XVECTOR_SIZE (state);
end = vecp + ASIZE (state);
FOR_EACH_FRAME (tail, frame)
{
......@@ -6124,8 +6124,8 @@ pass nil for VARIABLE. */)
/* Reallocate the vector if data has grown to need it,
or if it has shrunk a lot. */
if (! VECTORP (state)
|| n > XVECTOR_SIZE (state)
|| n + 20 < XVECTOR_SIZE (state) / 2)
|| n > ASIZE (state)
|| n + 20 < ASIZE (state) / 2)
/* Add 20 extra so we grow it less often. */
{
state = Fmake_vector (make_number (n + 20), Qlambda);
......@@ -6155,11 +6155,11 @@ pass nil for VARIABLE. */)
/* Fill up the vector with lambdas (always at least one). */
*vecp++ = Qlambda;
while (vecp - XVECTOR (state)->contents
< XVECTOR_SIZE (state))
< ASIZE (state))
*vecp++ = Qlambda;
/* Make sure we didn't overflow the vector. */
if (vecp - XVECTOR (state)->contents
> XVECTOR_SIZE (state))
> ASIZE (state))
abort ();
return Qt;
}
......
......@@ -54,7 +54,7 @@ extern Lisp_Object Qdisplay_table;
/* Return the current length of the GLYPH table,
or 0 if the table isn't currently valid. */
#define GLYPH_TABLE_LENGTH \
((VECTORP (Vglyph_table)) ? XVECTOR_SIZE (Vglyph_table) : 0)
((VECTORP (Vglyph_table)) ? ASIZE (Vglyph_table) : 0)
/* Return the current base (for indexing) of the GLYPH table,
or 0 if the table isn't currently valid. */
......
......@@ -787,7 +787,7 @@ a new string, without any text properties, is returned. */)
do_remap:
tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qnil);
if (VECTORP (tem) && XVECTOR_SIZE (tem) > 1
if (VECTORP (tem) && ASIZE (tem) > 1
&& EQ (AREF (tem, 0), Qremap) && SYMBOLP (AREF (tem, 1))
&& follow_remap)
{
......
......@@ -253,7 +253,7 @@ font_intern_prop (const char *str, int len, int force_symbol)
/* The following code is copied from the function intern (in
lread.c), and modified to suite our purpose. */
obarray = Vobarray;
if (!VECTORP (obarray) || XVECTOR_SIZE (obarray) == 0)
if (!VECTORP (obarray) || ASIZE (obarray) == 0)
obarray = check_obarray (obarray);
parse_str_as_multibyte ((unsigned char *) str, len, &nchars, &nbytes);
if (len == nchars || len != nbytes)
......
......@@ -1531,7 +1531,7 @@ If BITMAP already exists, the existing definition is replaced. */)
if (STRINGP (bits))
h = SCHARS (bits);
else if (VECTORP (bits))
h = XVECTOR_SIZE (bits);
h = ASIZE (bits);
else
wrong_type_argument (Qsequencep, bits);
......
......@@ -2359,7 +2359,7 @@ xbm_image_p (Lisp_Object object)
int i;
/* Number of elements of the vector must be >= height. */
if (XVECTOR_SIZE (data) < height)
if (ASIZE (data) < height)
return 0;
/* Each string or bool-vector in data must be large enough
......@@ -8398,7 +8398,7 @@ gs_image_p (Lisp_Object object)
}
else if (VECTORP (tem))
{
if (XVECTOR_SIZE (tem) != 4)
if (ASIZE (tem) != 4)
return 0;
for (i = 0; i < 4; ++i)
if (!INTEGERP (XVECTOR (tem)->contents[i]))
......
......@@ -93,7 +93,7 @@ character_width (int c, struct Lisp_Char_Table *dp)
/* Everything can be handled by the display table, if it's
present and the element is right. */
if (dp && (elt = DISP_CHAR_VECTOR (dp, c), VECTORP (elt)))
return XVECTOR_SIZE (elt);
return ASIZE (elt);
/* Some characters are special. */
if (c == '\n' || c == '\t' || c == '\015')
......@@ -284,7 +284,7 @@ skip_invisible (EMACS_INT pos, EMACS_INT *next_boundary_p, EMACS_INT to, Lisp_Ob
else \
{ \
if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, ch))) \
width = XVECTOR_SIZE (DISP_CHAR_VECTOR (dp, ch)); \
width = ASIZE (DISP_CHAR_VECTOR (dp, ch)); \
else \
width = CHAR_WIDTH (ch); \
} \
......@@ -766,7 +766,7 @@ string_display_width (string, beg, end)
c = *--ptr;
if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, c)))
col += XVECTOR_SIZE (DISP_CHAR_VECTOR (dp, c));
col += ASIZE (DISP_CHAR_VECTOR (dp, c));
else if (c >= 040 && c < 0177)
col++;
else if (c == '\n')
......@@ -1127,7 +1127,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_
: !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0);
int selective_rlen
= (selective && dp && VECTORP (DISP_INVIS_VECTOR (dp))
? XVECTOR_SIZE (DISP_INVIS_VECTOR (dp)) : 0);
? ASIZE (DISP_INVIS_VECTOR (dp)) : 0);
/* The next location where the `invisible' property changes, or an
overlay starts or ends. */
EMACS_INT next_boundary = from;
......
......@@ -134,7 +134,7 @@ static Lisp_Object raw_keybuf;
static int raw_keybuf_count;
#define GROW_RAW_KEYBUF \
if (raw_keybuf_count == XVECTOR_SIZE (raw_keybuf)) \
if (raw_keybuf_count == ASIZE (raw_keybuf)) \
raw_keybuf = larger_vector (raw_keybuf, raw_keybuf_count * 2, Qnil) \
/* Number of elements of this_command_keys
......@@ -2898,7 +2898,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event
if ((STRINGP (KVAR (current_kboard, Vkeyboard_translate_table))
&& SCHARS (KVAR (current_kboard, Vkeyboard_translate_table)) > (unsigned) XFASTINT (c))
|| (VECTORP (KVAR (current_kboard, Vkeyboard_translate_table))
&& XVECTOR_SIZE (KVAR (current_kboard, Vkeyboard_translate_table)) > (unsigned) XFASTINT (c))
&& ASIZE (KVAR (current_kboard, Vkeyboard_translate_table)) > (unsigned) XFASTINT (c))
|| (CHAR_TABLE_P (KVAR (current_kboard, Vkeyboard_translate_table))
&& CHARACTERP (c)))
{
......@@ -4198,7 +4198,7 @@ timer_start_idle (void)
timer = XCAR (timers);
if (!VECTORP (timer) || XVECTOR_SIZE (timer) != 8)
if (!VECTORP (timer) || ASIZE (timer) != 8)
continue;
XVECTOR (timer)->contents[0] = Qnil;
}
......@@ -4293,7 +4293,7 @@ timer_check_2 (void)
if (CONSP (timers))
{
timer = XCAR (timers);
if (!VECTORP (timer) || XVECTOR_SIZE (timer) != 8)
if (!VECTORP (timer) || ASIZE (timer) != 8)
{
timers = XCDR (timers);
continue;
......@@ -4311,7 +4311,7 @@ timer_check_2 (void)
if (CONSP (idle_timers))
{
timer = XCAR (idle_timers);
if (!VECTORP (timer) || XVECTOR_SIZE (timer) != 8)
if (!VECTORP (timer) || ASIZE (timer) != 8)
{
idle_timers = XCDR (idle_timers);
continue;
......@@ -5459,7 +5459,7 @@ make_lispy_event (struct input_event *event)
/* Find the menu bar item under `column'. */
item = Qnil;
items = FRAME_MENU_BAR_ITEMS (f);
for (i = 0; i < XVECTOR_SIZE (items); i += 4)
for (i = 0; i < ASIZE (items); i += 4)
{
Lisp_Object pos, string;
string = AREF (items, i + 1);
......@@ -5652,7 +5652,7 @@ make_lispy_event (struct input_event *event)
Qmouse_click, Vlispy_mouse_stem,
NULL,
&mouse_syms,
XVECTOR_SIZE (mouse_syms));
ASIZE (mouse_syms));
if (event->modifiers & drag_modifier)
return Fcons (head,
Fcons (start_pos,
......@@ -5823,7 +5823,7 @@ make_lispy_event (struct input_event *event)
Qmouse_click,
Vlispy_mouse_stem,
NULL, &mouse_syms,
XVECTOR_SIZE (mouse_syms));
ASIZE (mouse_syms));
return Fcons (head, Fcons (position, Qnil));
}
......@@ -5943,7 +5943,7 @@ make_lispy_event (struct input_event *event)
Qmouse_click, Vlispy_mouse_stem,
NULL,
&mouse_syms,
XVECTOR_SIZE (mouse_syms));
ASIZE (mouse_syms));
if (event->modifiers & drag_modifier)
return Fcons (head,
......@@ -6422,7 +6422,7 @@ modify_event_symbol (EMACS_INT symbol_num, unsigned int modifiers, Lisp_Object s
else
{
if (! VECTORP (*symbol_table)
|| XVECTOR_SIZE (*symbol_table) != table_size)
|| ASIZE (*symbol_table) != table_size)
{
Lisp_Object size;
......@@ -7479,7 +7479,7 @@ menu_bar_items (Lisp_Object old)
/* Add nil, nil, nil, nil at the end. */
{
int i = menu_bar_items_index;
if (i + 4 > XVECTOR_SIZE (menu_bar_items_vector))
if (i + 4 > ASIZE (menu_bar_items_vector))
menu_bar_items_vector =
larger_vector (menu_bar_items_vector, 2 * i, Qnil);
/* Add this item. */
......@@ -7551,7 +7551,7 @@ menu_bar_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy1, void *dumm
if (i == menu_bar_items_index)
{
/* If vector is too small, get a bigger one. */
if (i + 4 > XVECTOR_SIZE (menu_bar_items_vector))
if (i + 4 > ASIZE (menu_bar_items_vector))
menu_bar_items_vector = larger_vector (menu_bar_items_vector, 2 * i, Qnil);
/* Add this item. */
XVECTOR (menu_bar_items_vector)->contents[i++] = key;
......@@ -8219,7 +8219,7 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
}
else if (EQ (ikey, QCimage)
&& (CONSP (value)
|| (VECTORP (value) && XVECTOR_SIZE (value) == 4)))
|| (VECTORP (value) && ASIZE (value) == 4)))
/* Value is either a single image specification or a vector
of 4 such specifications for the different button states. */
PROP (TOOL_BAR_ITEM_IMAGES) = value;
......@@ -8323,10 +8323,10 @@ append_tool_bar_item (void)
/* Enlarge tool_bar_items_vector if necessary. */
if (ntool_bar_items + TOOL_BAR_ITEM_NSLOTS
>= XVECTOR_SIZE (tool_bar_items_vector))
>= ASIZE (tool_bar_items_vector))
tool_bar_items_vector
= larger_vector (tool_bar_items_vector,
2 * XVECTOR_SIZE (tool_bar_items_vector), Qnil);
2 * ASIZE (tool_bar_items_vector), Qnil);
/* Append entries from tool_bar_item_properties to the end of
tool_bar_items_vector. */
......@@ -8648,7 +8648,7 @@ read_char_minibuf_menu_prompt (int commandflag, int nmaps, Lisp_Object *maps)
}
/* Move past this element. */
if (idx >= 0 && idx + 1 >= XVECTOR_SIZE (vector))
if (idx >= 0 && idx + 1 >= ASIZE (vector))
/* Handle reaching end of dense table. */
idx = -1;
if (idx >= 0)
......@@ -10292,7 +10292,7 @@ give to the command you invoke, if it asks for an argument. */)
this_single_command_key_start = 0;
keys = XVECTOR (saved_keys)->contents;
for (i = 0; i < XVECTOR_SIZE (saved_keys); i++)
for (i = 0; i < ASIZE (saved_keys); i++)
add_command_key (keys[i]);
for (i = 0; i < SCHARS (function); i++)
......@@ -10585,7 +10585,7 @@ KEEP-RECORD is non-nil. */)
if (NILP (keep_record))
{
for (i = 0; i < XVECTOR_SIZE (recent_keys); ++i)
for (i = 0; i < ASIZE (recent_keys); ++i)
XVECTOR (recent_keys)->contents[i] = Qnil;
total_keys = 0;
recent_keys_index = 0;
......
......@@ -359,7 +359,7 @@ Return PARENT. PARENT should be nil or another keymap. */)
XCDR (XCAR (list)));
if (VECTORP (XCAR (list)))
for (i = 0; i < XVECTOR_SIZE (XCAR (list)); i++)
for (i = 0; i < ASIZE (XCAR (list)); i++)
if (CONSP (XVECTOR (XCAR (list))->contents[i]))
fix_submap_inheritance (keymap, make_number (i),
XVECTOR (XCAR (list))->contents[i]);
......@@ -2226,7 +2226,7 @@ spaces are put between sequence elements, etc. */)
if (STRINGP (list))
size = SCHARS (list);
else if (VECTORP (list))
size = XVECTOR_SIZE (list);
size = ASIZE (list);
else if (CONSP (list))
size = XINT (Flength (list));
else
......@@ -3125,7 +3125,7 @@ key binding\n\
elt = XCAR (list);
elt_prefix = Fcar (elt);
if (XVECTOR_SIZE (elt_prefix) >= 1)
if (ASIZE (elt_prefix) >= 1)
{
tem = Faref (elt_prefix, make_number (0));
if (EQ (tem, Qmenu_bar))
......@@ -3168,7 +3168,7 @@ key binding\n\
/* If the sequence by which we reach this keymap is zero-length,
then the shadow map for this keymap is just SHADOW. */
if ((STRINGP (elt_prefix) && SCHARS (elt_prefix) == 0)
|| (VECTORP (elt_prefix) && XVECTOR_SIZE (elt_prefix) == 0))
|| (VECTORP (elt_prefix) && ASIZE (elt_prefix) == 0))
;
/* If the sequence by which we reach this keymap actually has
some elements, then the sequence's definition in SHADOW is
......@@ -3592,7 +3592,7 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
if (CHAR_TABLE_P (vector))
stop = MAX_5_BYTE_CHAR + 1, to = MAX_CHAR + 1;
else
stop = to = XVECTOR_SIZE (vector);
stop = to = ASIZE (vector);
for (i = from; ; i++)
{
......
......@@ -554,9 +554,8 @@ extern Lisp_Object make_number (EMACS_INT);
#define XSYMBOL(a) (eassert (SYMBOLP(a)),(struct Lisp_Symbol *) XPNTR(a))
#define XFLOAT(a) (eassert (FLOATP(a)),(struct Lisp_Float *) XPNTR(a))
/* Extract the size field of a vector or vector-like object. */
/* Extract the size field of a vector-like object. */
#define XVECTOR_SIZE(a) (XVECTOR (a)->header.size + 0)
#define XVECTORLIKE_HEADER_SIZE(a) \
(((struct vectorlike_header *) XPNTR (a))->size + 0)
......@@ -634,7 +633,7 @@ extern Lisp_Object make_number (EMACS_INT);
/* Convenience macros for dealing with Lisp arrays. */
#define AREF(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX]
#define ASIZE(ARRAY) XVECTOR_SIZE (ARRAY)
#define ASIZE(ARRAY) XVECTOR ((ARRAY))->header.size
/* The IDX==IDX tries to detect when the macro argument is side-effecting. */
#define ASET(ARRAY, IDX, VAL) \
(eassert ((IDX) == (IDX)), \
......@@ -1222,7 +1221,7 @@ struct Lisp_Hash_Table
/* Value is the size of hash table H. */
#define HASH_TABLE_SIZE(H) XVECTOR_SIZE ((H)->next)
#define HASH_TABLE_SIZE(H) ASIZE ((H)->next)
/* Default size for hash tables if not specified. */
......@@ -1640,7 +1639,7 @@ typedef struct {
#define CONSP(x) (XTYPE ((x)) == Lisp_Cons)
#define FLOATP(x) (XTYPE ((x)) == Lisp_Float)
#define VECTORP(x) (VECTORLIKEP (x) && !(XVECTOR_SIZE (x) & PSEUDOVECTOR_FLAG))
#define VECTORP(x) (VECTORLIKEP (x) && !(ASIZE (x) & PSEUDOVECTOR_FLAG))
#define OVERLAYP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Overlay)
#define MARKERP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Marker)
#define SAVE_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Save_Value)
......
......@@ -2430,7 +2430,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
{
Lisp_Object tmp;
tmp = read_vector (readcharfun, 0);
if (XVECTOR_SIZE (tmp) < CHAR_TABLE_STANDARD_SLOTS)
if (ASIZE (tmp) < CHAR_TABLE_STANDARD_SLOTS)
error ("Invalid size char-table");
XSETPVECTYPE (XVECTOR (tmp), PVEC_CHAR_TABLE);
return tmp;
......@@ -2449,7 +2449,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
depth = XINT (AREF (tmp, 0));
if (depth < 1 || depth > 3)
error ("Invalid depth in char-table");
size = XVECTOR_SIZE (tmp) - 2;
size = ASIZE (tmp) - 2;
if (chartab_size [depth] != size)
error ("Invalid size char-table");
XSETPVECTYPE (XVECTOR (tmp), PVEC_SUB_CHAR_TABLE);
......@@ -2499,7 +2499,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
build them using function calls. */
Lisp_Object tmp;
tmp = read_vector (readcharfun, 1);
return Fmake_byte_code (XVECTOR_SIZE (tmp),
return Fmake_byte_code (ASIZE (tmp),
XVECTOR (tmp)->contents);
}
if (c == '(')
......@@ -3356,7 +3356,7 @@ read_vector (Lisp_Object readcharfun, int bytecodeflag)
len = Flength (tem);
vector = (read_pure ? make_pure_vector (XINT (len)) : Fmake_vector (len, Qnil));
size = XVECTOR_SIZE (vector);
size = ASIZE (vector);
ptr = XVECTOR (vector)->contents;
for (i = 0; i < size; i++)
{
......@@ -3621,7 +3621,7 @@ static int hash_string (const char *ptr, int len);
Lisp_Object
check_obarray (Lisp_Object obarray)
{
if (!VECTORP (obarray) || XVECTOR_SIZE (obarray) == 0)
if (!VECTORP (obarray) || ASIZE (obarray) == 0)
{
/* If Vobarray is now invalid, force it to be valid. */
if (EQ (Vobarray, obarray)) Vobarray = initial_obarray;
......@@ -3641,7 +3641,7 @@ intern (const char *str)
Lisp_Object obarray;
obarray = Vobarray;
if (!VECTORP (obarray) || XVECTOR_SIZE (obarray) == 0)
if (!VECTORP (obarray) || ASIZE (obarray) == 0)
obarray = check_obarray (obarray);
tem = oblookup (obarray, str, len, len);
if (SYMBOLP (tem))
......@@ -3657,7 +3657,7 @@ intern_c_string (const char *str)
Lisp_Object obarray;
obarray = Vobarray;
if (!VECTORP (obarray) || XVECTOR_SIZE (obarray) == 0)
if (!VECTORP (obarray) || ASIZE (obarray) == 0)
obarray = check_obarray (obarray);
tem = oblookup (obarray, str, len, len);
if (SYMBOLP (tem))
......@@ -3830,10 +3830,10 @@ oblookup (Lisp_Object obarray, register const char *ptr, EMACS_INT size, EMACS_I
Lisp_Object bucket, tem;
if (!VECTORP (obarray)
|| (obsize = XVECTOR_SIZE (obarray)) == 0)
|| (obsize = ASIZE (obarray)) == 0)
{
obarray = check_obarray (obarray);
obsize = XVECTOR_SIZE (obarray);
obsize = ASIZE (obarray);
}
/* This is sometimes needed in the middle of GC. */
obsize &= ~ARRAY_MARK_FLAG;
......@@ -3881,7 +3881,7 @@ map_obarray (Lisp_Object obarray, void (*fn) (Lisp_Object, Lisp_Object), Lisp_Ob
register int i;
register Lisp_Object tail;
CHECK_VECTOR (obarray);
for (i = XVECTOR_SIZE (obarray) - 1; i >= 0; i--)
for (i = ASIZE (obarray) - 1; i >= 0; i--)
{
tail = XVECTOR (obarray)->contents[i];
if (SYMBOLP (tail))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment