summaryrefslogtreecommitdiff
path: root/src/lisp.h
diff options
context:
space:
mode:
authorJoakim Verona <joakim@verona.se>2015-01-22 08:27:13 +0100
committerJoakim Verona <joakim@verona.se>2015-01-22 08:27:13 +0100
commit5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315 (patch)
treec9e3511c8164d2154c91820e0d90521762dc7bdf /src/lisp.h
parentd6ada5ae0fad7a5c85eb28b102bc460e9fe0aceb (diff)
parent7f4e7dd378c456b498c270b47b46aaae365a72ab (diff)
downloademacs-5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315.tar.gz
merge master
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h10
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