diff options
| author | Paul Eggert | 2015-01-19 00:56:18 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-01-19 01:01:58 -0800 |
| commit | b7f83adda5a32140811e8e7decc4394d64cada3d (patch) | |
| tree | 98d7d6763a62fc033464e4f2d5edde5c937623dd /src/callint.c | |
| parent | 9592a014df784e67a4647d5b6424f2758dfaad3c (diff) | |
| download | emacs-b7f83adda5a32140811e8e7decc4394d64cada3d.tar.gz emacs-b7f83adda5a32140811e8e7decc4394d64cada3d.zip | |
Prefer memset to repeatedly assigning Qnil
* alloc.c (allocate_pseudovector): Catch more bogus values.
* alloc.c (allocate_pseudovector):
* callint.c (Fcall_interactively):
* coding.c (syms_of_coding):
* fringe.c (init_fringe):
Verify that Qnil == 0.
* callint.c (Fcall_interactively):
* eval.c (Fapply, Ffuncall):
* fns.c (mapcar1, larger_vector):
* font.c (font_expand_wildcards):
* fringe.c (init_fringe):
Prefer memset to assigning zeros by hand.
* callint.c (Fcall_interactively):
Remove duplicate assignment of Qnil to args[i].
* coding.c (syms_of_coding):
Prefer LISP_INITIALLY_ZERO to assigning zeros by hand.
* fileio.c (Ffile_selinux_context):
Rewrite to avoid need for Lisp_Object array.
* lisp.h (XLI_BUILTIN_LISPSYM): New macro.
(DEFINE_LISP_SYMBOL_END): Use it.
(NIL_IS_ZERO): New constant.
(memsetnil): New function.
Diffstat (limited to 'src/callint.c')
| -rw-r--r-- | src/callint.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/callint.c b/src/callint.c index dd238b976aa..3a595b57d77 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -509,12 +509,8 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 509 | visargs = args + nargs; | 509 | visargs = args + nargs; |
| 510 | varies = (signed char *) (visargs + nargs); | 510 | varies = (signed char *) (visargs + nargs); |
| 511 | 511 | ||
| 512 | for (i = 0; i < nargs; i++) | 512 | verify (NIL_IS_ZERO); |
| 513 | { | 513 | memset (args, 0, nargs * (2 * word_size + 1)); |
| 514 | args[i] = Qnil; | ||
| 515 | visargs[i] = Qnil; | ||
| 516 | varies[i] = 0; | ||
| 517 | } | ||
| 518 | 514 | ||
| 519 | GCPRO5 (prefix_arg, function, *args, *visargs, up_event); | 515 | GCPRO5 (prefix_arg, function, *args, *visargs, up_event); |
| 520 | gcpro3.nvars = nargs; | 516 | gcpro3.nvars = nargs; |
| @@ -781,7 +777,7 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 781 | argument if no prefix. */ | 777 | argument if no prefix. */ |
| 782 | if (NILP (prefix_arg)) | 778 | if (NILP (prefix_arg)) |
| 783 | { | 779 | { |
| 784 | args[i] = Qnil; | 780 | /* args[i] = Qnil; */ |
| 785 | varies[i] = -1; | 781 | varies[i] = -1; |
| 786 | } | 782 | } |
| 787 | else | 783 | else |