diff options
author | Joakim Verona <joakim@verona.se> | 2015-01-22 08:27:13 +0100 |
---|---|---|
committer | Joakim Verona <joakim@verona.se> | 2015-01-22 08:27:13 +0100 |
commit | 5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315 (patch) | |
tree | c9e3511c8164d2154c91820e0d90521762dc7bdf /src/lisp.h | |
parent | d6ada5ae0fad7a5c85eb28b102bc460e9fe0aceb (diff) | |
parent | 7f4e7dd378c456b498c270b47b46aaae365a72ab (diff) | |
download | emacs-5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315.tar.gz |
merge master
Diffstat (limited to 'src/lisp.h')
-rw-r--r-- | src/lisp.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lisp.h b/src/lisp.h index f1e6945f43a..76a9ed8f159 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1513,13 +1513,15 @@ gc_aset (Lisp_Object array, ptrdiff_t idx, Lisp_Object val) to find such assumptions later if we change Qnil to be nonzero. */ enum { NIL_IS_ZERO = XLI_BUILTIN_LISPSYM (iQnil) == 0 }; -/* Set a Lisp_Object array V's N entries to nil. */ +/* Clear the object addressed by P, with size NBYTES, so that all its + bytes are zero and all its Lisp values are nil. */ INLINE void -memsetnil (Lisp_Object *v, ptrdiff_t n) +memclear (void *p, ptrdiff_t nbytes) { - eassert (0 <= n); + eassert (0 <= nbytes); verify (NIL_IS_ZERO); - memset (v, 0, n * sizeof *v); + /* Since Qnil is zero, memset suffices. */ + memset (p, 0, nbytes); } /* If a struct is made to look like a vector, this macro returns the length |