diff options
author | Lars Brinkhoff <lars@nocrew.org> | 2017-04-03 08:42:18 +0200 |
---|---|---|
committer | Lars Brinkhoff <lars@nocrew.org> | 2017-04-10 08:32:23 +0200 |
commit | c9b173eff5154cfd2d7567cdf400e48c88fd51d2 (patch) | |
tree | e87ce1ccc69052906f8713f4720d9578be6e5534 /src/data.c | |
parent | 0fb52dcc45742af58a081bd6ca27b70f6a6a1899 (diff) | |
download | emacs-scratch/pvsize.tar.gz |
Please revew: PVSIZE, pseudovector size.scratch/pvsize
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/data.c b/src/data.c index 903e809d235..141b26ccf35 100644 --- a/src/data.c +++ b/src/data.c @@ -270,7 +270,7 @@ for example, (type-of 1) returns `integer'. */) case PVEC_RECORD: { Lisp_Object t = AREF (object, 0); - if (RECORDP (t) && 1 < (ASIZE (t) & PSEUDOVECTOR_SIZE_MASK)) + if (RECORDP (t) && 1 < PVSIZE (t)) /* Return the type name field of the class! */ return AREF (t, 1); else @@ -902,7 +902,7 @@ Value, if non-nil, is a list (interactive SPEC). */) } else if (COMPILEDP (fun)) { - if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) > COMPILED_INTERACTIVE) + if (PVSIZE (fun) > COMPILED_INTERACTIVE) return list2 (Qinteractive, AREF (fun, COMPILED_INTERACTIVE)); } else if (AUTOLOADP (fun)) @@ -2306,7 +2306,7 @@ or a byte-code object. IDX starts at 0. */) if (VECTORP (array)) size = ASIZE (array); else if (COMPILEDP (array) || RECORDP (array)) - size = ASIZE (array) & PSEUDOVECTOR_SIZE_MASK; + size = PVSIZE (array); else wrong_type_argument (Qarrayp, array); @@ -2349,8 +2349,7 @@ bool-vector. IDX starts at 0. */) } else if (RECORDP (array)) { - ptrdiff_t size = ASIZE (array) & PSEUDOVECTOR_SIZE_MASK; - if (idxval < 0 || idxval >= size) + if (idxval < 0 || idxval >= PVSIZE (array)) args_out_of_range (array, idx); ASET (array, idxval, newelt); } |