Simplify Vobarray checking in oblookup.

* lread.c (oblookup): Simplify Vobarray checking.
This commit is contained in:
Dmitry Antipov 2012-07-11 12:33:04 +04:00
parent 4b575b3c9d
commit 2bce56431c
2 changed files with 5 additions and 7 deletions

View file

@ -4,7 +4,8 @@
* lisp.h (intern, intern_c_string): Redefine as static inline
wrappers for intern_1 and intern_c_string_1, respectively.
(intern_1, intern_c_string_1): Rename prototypes.
* lread.c (intern_1, intern_c_string_1): Simplify Vobarray checking.
* lread.c (intern_1, intern_c_string_1, oblookup): Simplify
Vobarray checking.
* font.c (font_intern_prop): Likewise. Adjust comment.
* w32font.c (intern_font_name): Likewise.

View file

@ -3835,12 +3835,9 @@ oblookup (Lisp_Object obarray, register const char *ptr, ptrdiff_t size, ptrdiff
register Lisp_Object tail;
Lisp_Object bucket, tem;
if (!VECTORP (obarray)
|| (obsize = ASIZE (obarray)) == 0)
{
obarray = check_obarray (obarray);
obsize = ASIZE (obarray);
}
obarray = check_obarray (obarray);
obsize = ASIZE (obarray);
/* This is sometimes needed in the middle of GC. */
obsize &= ~ARRAY_MARK_FLAG;
hash = hash_string (ptr, size_byte) % obsize;