aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorJoakim Verona2015-01-20 00:54:09 +0100
committerJoakim Verona2015-01-20 00:54:09 +0100
commitfee879f0a00bbe3f3389509874ee30a9cbc24cd4 (patch)
tree5bc4dc325818bec8a6a4cf20b1c907d23e24425a /src/alloc.c
parent395a90fee92a836f55df0b879f8ee3d862d648ac (diff)
parentfb6462f056f616f3da8ae18037c7c2137fecb6fd (diff)
downloademacs-fee879f0a00bbe3f3389509874ee30a9cbc24cd4.tar.gz
emacs-fee879f0a00bbe3f3389509874ee30a9cbc24cd4.zip
Merge branch 'master' into xwidget
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 22a15b4ac59..2c7b02f1158 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3169,12 +3169,14 @@ allocate_pseudovector (int memlen, int lisplen,
3169 struct Lisp_Vector *v = allocate_vectorlike (memlen); 3169 struct Lisp_Vector *v = allocate_vectorlike (memlen);
3170 3170
3171 /* Catch bogus values. */ 3171 /* Catch bogus values. */
3172 eassert (tag <= PVEC_FONT); 3172 eassert (0 <= tag && tag <= PVEC_FONT);
3173 eassert (0 <= lisplen && lisplen <= zerolen && zerolen <= memlen);
3173 eassert (memlen - lisplen <= (1 << PSEUDOVECTOR_REST_BITS) - 1); 3174 eassert (memlen - lisplen <= (1 << PSEUDOVECTOR_REST_BITS) - 1);
3174 eassert (lisplen <= (1 << PSEUDOVECTOR_SIZE_BITS) - 1); 3175 eassert (lisplen <= (1 << PSEUDOVECTOR_SIZE_BITS) - 1);
3175 3176
3176 /* Only the first lisplen slots will be traced normally by the GC. 3177 /* Only the first LISPLEN slots will be traced normally by the GC.
3177 But since Qnil == 0, we can memset Lisp_Object slots as well. */ 3178 But since Qnil == 0, we can memset Lisp_Object slots as well. */
3179 verify (NIL_IS_ZERO);
3178 memset (v->contents, 0, zerolen * word_size); 3180 memset (v->contents, 0, zerolen * word_size);
3179 3181
3180 XSETPVECTYPESIZE (v, tag, lisplen, memlen - lisplen); 3182 XSETPVECTYPESIZE (v, tag, lisplen, memlen - lisplen);