diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-01-21 20:01:10 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-01-21 20:03:34 -0800 |
commit | 74244d239e9093035c369721b469529a5fdaf1c6 (patch) | |
tree | 971d34cc4c4c1ba554ae7dc8faeb274fe413e3e3 /src/eval.c | |
parent | 03346fb0747ddb39786bd9e43fe7f422cd48b9fe (diff) | |
download | emacs-74244d239e9093035c369721b469529a5fdaf1c6.tar.gz |
Better isolate code that assumes NIL_IS_ZERO
Suggested by Stefan Monnier in:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00588.html
* alloc.c (allocate_pseudovector):
Use memclear, not memsetnil, to remove a 'verify'.
* callint.c (Fcall_interactively):
* dispnew.c (realloc_glyph_pool):
* xdisp.c (init_iterator):
Use memclear, not memset, to remove a 'verify'.
* lisp.h (memclear): Rename from memsetnil, and take a byte
count rather than a word count. All callers changed.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c index ddf6535cabc..e649c152a5d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -2299,7 +2299,8 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) /* Avoid making funcall cons up a yet another new vector of arguments by explicitly supplying nil's for optional values. */ SAFE_ALLOCA_LISP (funcall_args, 1 + XSUBR (fun)->max_args); - memsetnil (funcall_args + numargs + 1, XSUBR (fun)->max_args - numargs); + memclear (funcall_args + numargs + 1, + (XSUBR (fun)->max_args - numargs) * word_size); funcall_nargs = 1 + XSUBR (fun)->max_args; } else @@ -2693,8 +2694,8 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) eassert (XSUBR (fun)->max_args <= ARRAYELTS (internal_argbuf)); internal_args = internal_argbuf; memcpy (internal_args, args + 1, numargs * word_size); - memsetnil (internal_args + numargs, - XSUBR (fun)->max_args - numargs); + memclear (internal_args + numargs, + (XSUBR (fun)->max_args - numargs) * word_size); } else internal_args = args + 1; |