aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorJoakim Verona2015-01-22 08:27:13 +0100
committerJoakim Verona2015-01-22 08:27:13 +0100
commit5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315 (patch)
treec9e3511c8164d2154c91820e0d90521762dc7bdf /src/lisp.h
parentd6ada5ae0fad7a5c85eb28b102bc460e9fe0aceb (diff)
parent7f4e7dd378c456b498c270b47b46aaae365a72ab (diff)
downloademacs-5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315.tar.gz
emacs-5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315.zip
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)
1513 to find such assumptions later if we change Qnil to be nonzero. */ 1513 to find such assumptions later if we change Qnil to be nonzero. */
1514enum { NIL_IS_ZERO = XLI_BUILTIN_LISPSYM (iQnil) == 0 }; 1514enum { NIL_IS_ZERO = XLI_BUILTIN_LISPSYM (iQnil) == 0 };
1515 1515
1516/* Set a Lisp_Object array V's N entries to nil. */ 1516/* Clear the object addressed by P, with size NBYTES, so that all its
1517 bytes are zero and all its Lisp values are nil. */
1517INLINE void 1518INLINE void
1518memsetnil (Lisp_Object *v, ptrdiff_t n) 1519memclear (void *p, ptrdiff_t nbytes)
1519{ 1520{
1520 eassert (0 <= n); 1521 eassert (0 <= nbytes);
1521 verify (NIL_IS_ZERO); 1522 verify (NIL_IS_ZERO);
1522 memset (v, 0, n * sizeof *v); 1523 /* Since Qnil is zero, memset suffices. */
1524 memset (p, 0, nbytes);
1523} 1525}
1524 1526
1525/* If a struct is made to look like a vector, this macro returns the length 1527/* If a struct is made to look like a vector, this macro returns the length