diff options
| author | Paul Eggert | 2015-01-20 13:56:14 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-01-20 13:56:46 -0800 |
| commit | 0dd19ac82662c5710e73852f438fd55e1d9225b7 (patch) | |
| tree | 67074879f366306af045d28f68d208fc2cf1a0ff /src/alloc.c | |
| parent | 3a8312d00e59b50e76121cd512177e999c18b06d (diff) | |
| download | emacs-0dd19ac82662c5710e73852f438fd55e1d9225b7.tar.gz emacs-0dd19ac82662c5710e73852f438fd55e1d9225b7.zip | |
Undo port to hypothetical nonzero Qnil case
This mostly undoes the previous change in this area. See:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00570.html
* alloc.c (allocate_pseudovector):
* callint.c (Fcall_interactively):
* dispnew.c (realloc_glyph_pool):
* fringe.c (init_fringe):
* lisp.h (memsetnil):
* xdisp.c (init_iterator):
Simplify by assuming that Qnil is zero, but verify the assumption.
* lisp.h (NIL_IS_ZERO): Revert back to this symbol, removing
NIL_IS_NONZERO. All uses changed.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index d758ca18a7b..bf0456c6862 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3175,10 +3175,9 @@ allocate_pseudovector (int memlen, int lisplen, | |||
| 3175 | eassert (lisplen <= (1 << PSEUDOVECTOR_SIZE_BITS) - 1); | 3175 | eassert (lisplen <= (1 << PSEUDOVECTOR_SIZE_BITS) - 1); |
| 3176 | 3176 | ||
| 3177 | /* Only the first LISPLEN slots will be traced normally by the GC. | 3177 | /* Only the first LISPLEN slots will be traced normally by the GC. |
| 3178 | If Qnil is nonzero, clear the non-Lisp data separately. */ | 3178 | Since Qnil == 0, we can memset Lisp and non-Lisp data at one go. */ |
| 3179 | verify (NIL_IS_ZERO); | ||
| 3179 | memsetnil (v->contents, zerolen); | 3180 | memsetnil (v->contents, zerolen); |
| 3180 | if (NIL_IS_NONZERO) | ||
| 3181 | memset (v->contents + lisplen, 0, (zerolen - lisplen) * word_size); | ||
| 3182 | 3181 | ||
| 3183 | XSETPVECTYPESIZE (v, tag, lisplen, memlen - lisplen); | 3182 | XSETPVECTYPESIZE (v, tag, lisplen, memlen - lisplen); |
| 3184 | return v; | 3183 | return v; |