From: Dmitry Antipov Date: Wed, 11 Jul 2012 08:33:04 +0000 (+0400) Subject: Simplify Vobarray checking in oblookup. X-Git-Tag: emacs-24.2.90~1199^2~60 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2bce56431c1e974327e08e93a63c9b1531918afe;p=emacs.git Simplify Vobarray checking in oblookup. * lread.c (oblookup): Simplify Vobarray checking. --- diff --git a/src/ChangeLog b/src/ChangeLog index de97c08c6fc..ae0d7982bae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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. diff --git a/src/lread.c b/src/lread.c index 13f41413196..d8a0275bee7 100644 --- a/src/lread.c +++ b/src/lread.c @@ -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;