From: Paul Eggert Date: Sat, 10 Oct 2015 22:46:28 +0000 (-0700) Subject: Improve CHECK_IMPURE and PURE_P speedup X-Git-Tag: emacs-25.0.90~1171 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=89f2c79868e7bcc2fc5436796f063d1e903dea41;p=emacs.git Improve CHECK_IMPURE and PURE_P speedup * src/data.c (Faset): Use XVECTOR and XSTRING rather than XPNTR. --- 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. */) CHECK_NUMBER (idx); idxval = XINT (idx); CHECK_ARRAY (array, Qarrayp); - CHECK_IMPURE (array, XPNTR (array)); if (VECTORP (array)) { + CHECK_IMPURE (array, XVECTOR (array)); if (idxval < 0 || idxval >= ASIZE (array)) args_out_of_range (array, idx); ASET (array, idxval, newelt); @@ -2238,6 +2238,7 @@ bool-vector. IDX starts at 0. */) { int c; + CHECK_IMPURE (array, XSTRING (array)); if (idxval < 0 || idxval >= SCHARS (array)) args_out_of_range (array, idx); CHECK_CHARACTER (newelt);