aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2015-10-10 15:46:28 -0700
committerPaul Eggert2015-10-10 15:46:55 -0700
commit89f2c79868e7bcc2fc5436796f063d1e903dea41 (patch)
treebe18715aa1a0092f4b1a39edfab3570520363971 /src
parent5186c998574a8807713b9a43518fdeae52feac67 (diff)
downloademacs-89f2c79868e7bcc2fc5436796f063d1e903dea41.tar.gz
emacs-89f2c79868e7bcc2fc5436796f063d1e903dea41.zip
Improve CHECK_IMPURE and PURE_P speedup
* src/data.c (Faset): Use XVECTOR and XSTRING rather than XPNTR.
Diffstat (limited to 'src')
-rw-r--r--src/data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/data.c b/src/data.c
index a910f6e58f3..b85d8a77106 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2215,10 +2215,10 @@ bool-vector. IDX starts at 0. */)
2215 CHECK_NUMBER (idx); 2215 CHECK_NUMBER (idx);
2216 idxval = XINT (idx); 2216 idxval = XINT (idx);
2217 CHECK_ARRAY (array, Qarrayp); 2217 CHECK_ARRAY (array, Qarrayp);
2218 CHECK_IMPURE (array, XPNTR (array));
2219 2218
2220 if (VECTORP (array)) 2219 if (VECTORP (array))
2221 { 2220 {
2221 CHECK_IMPURE (array, XVECTOR (array));
2222 if (idxval < 0 || idxval >= ASIZE (array)) 2222 if (idxval < 0 || idxval >= ASIZE (array))
2223 args_out_of_range (array, idx); 2223 args_out_of_range (array, idx);
2224 ASET (array, idxval, newelt); 2224 ASET (array, idxval, newelt);
@@ -2238,6 +2238,7 @@ bool-vector. IDX starts at 0. */)
2238 { 2238 {
2239 int c; 2239 int c;
2240 2240
2241 CHECK_IMPURE (array, XSTRING (array));
2241 if (idxval < 0 || idxval >= SCHARS (array)) 2242 if (idxval < 0 || idxval >= SCHARS (array))
2242 args_out_of_range (array, idx); 2243 args_out_of_range (array, idx);
2243 CHECK_CHARACTER (newelt); 2244 CHECK_CHARACTER (newelt);