From 2bce56431c1e974327e08e93a63c9b1531918afe Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 11 Jul 2012 12:33:04 +0400 Subject: [PATCH] Simplify Vobarray checking in oblookup. * lread.c (oblookup): Simplify Vobarray checking. --- src/ChangeLog | 3 ++- src/lread.c | 9 +++------ 2 files changed, 5 insertions(+), 7 deletions(-) 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; -- 2.39.2