diff options
| author | Dmitry Antipov | 2012-07-11 12:33:04 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-07-11 12:33:04 +0400 |
| commit | 2bce56431c1e974327e08e93a63c9b1531918afe (patch) | |
| tree | ae5802c86914ceaab39c2bb443e52833a38d373e /src | |
| parent | 4b575b3c9d8050b9fba20fa704d6e2d81414e2e6 (diff) | |
| download | emacs-2bce56431c1e974327e08e93a63c9b1531918afe.tar.gz emacs-2bce56431c1e974327e08e93a63c9b1531918afe.zip | |
Simplify Vobarray checking in oblookup.
* lread.c (oblookup): Simplify Vobarray checking.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | 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 @@ | |||
| 4 | * lisp.h (intern, intern_c_string): Redefine as static inline | 4 | * lisp.h (intern, intern_c_string): Redefine as static inline |
| 5 | wrappers for intern_1 and intern_c_string_1, respectively. | 5 | wrappers for intern_1 and intern_c_string_1, respectively. |
| 6 | (intern_1, intern_c_string_1): Rename prototypes. | 6 | (intern_1, intern_c_string_1): Rename prototypes. |
| 7 | * lread.c (intern_1, intern_c_string_1): Simplify Vobarray checking. | 7 | * lread.c (intern_1, intern_c_string_1, oblookup): Simplify |
| 8 | Vobarray checking. | ||
| 8 | * font.c (font_intern_prop): Likewise. Adjust comment. | 9 | * font.c (font_intern_prop): Likewise. Adjust comment. |
| 9 | * w32font.c (intern_font_name): Likewise. | 10 | * w32font.c (intern_font_name): Likewise. |
| 10 | 11 | ||
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 | |||
| 3835 | register Lisp_Object tail; | 3835 | register Lisp_Object tail; |
| 3836 | Lisp_Object bucket, tem; | 3836 | Lisp_Object bucket, tem; |
| 3837 | 3837 | ||
| 3838 | if (!VECTORP (obarray) | 3838 | obarray = check_obarray (obarray); |
| 3839 | || (obsize = ASIZE (obarray)) == 0) | 3839 | obsize = ASIZE (obarray); |
| 3840 | { | 3840 | |
| 3841 | obarray = check_obarray (obarray); | ||
| 3842 | obsize = ASIZE (obarray); | ||
| 3843 | } | ||
| 3844 | /* This is sometimes needed in the middle of GC. */ | 3841 | /* This is sometimes needed in the middle of GC. */ |
| 3845 | obsize &= ~ARRAY_MARK_FLAG; | 3842 | obsize &= ~ARRAY_MARK_FLAG; |
| 3846 | hash = hash_string (ptr, size_byte) % obsize; | 3843 | hash = hash_string (ptr, size_byte) % obsize; |