diff options
-rw-r--r-- | src/ccl.c | 4 | ||||
-rw-r--r-- | src/dosfns.c | 22 | ||||
-rw-r--r-- | src/lisp.h | 10 |
3 files changed, 19 insertions, 17 deletions
diff --git a/src/ccl.c b/src/ccl.c index f1d4c28df1c..ff42c6f25fc 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -2062,9 +2062,9 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY if (TYPE_RANGED_FIXNUMP (int, AREF (status, i))) ccl.reg[i] = XFIXNUM (AREF (status, i)); } - if (FIXNUMP (AREF (status, i))) + if (FIXNUMP (AREF (status, 8))) { - EMACS_INT ic = XFIXNUM (AREF (status, i)); + EMACS_INT ic = XFIXNUM (AREF (status, 8)); if (ccl.ic < ic && ic < ccl.size) ccl.ic = ic; } diff --git a/src/dosfns.c b/src/dosfns.c index fb5bcc9ad3f..635f29bd656 100644 --- a/src/dosfns.c +++ b/src/dosfns.c @@ -72,16 +72,16 @@ REGISTERS should be a vector produced by `make-register' and if (no < 0 || no > 0xff || ASIZE (registers) != 8) return Qnil; for (i = 0; i < 8; i++) - CHECK_FIXNAT (AREF (registers, i)); + CHECK_FIXNUM (AREF (registers, i)); - inregs.x.ax = (unsigned long) XFIXNAT (AREF (registers, 0)); - inregs.x.bx = (unsigned long) XFIXNAT (AREF (registers, 1)); - inregs.x.cx = (unsigned long) XFIXNAT (AREF (registers, 2)); - inregs.x.dx = (unsigned long) XFIXNAT (AREF (registers, 3)); - inregs.x.si = (unsigned long) XFIXNAT (AREF (registers, 4)); - inregs.x.di = (unsigned long) XFIXNAT (AREF (registers, 5)); - inregs.x.cflag = (unsigned long) XFIXNAT (AREF (registers, 6)); - inregs.x.flags = (unsigned long) XFIXNAT (AREF (registers, 7)); + inregs.x.ax = (unsigned long) XFIXNUM (AREF (registers, 0)); + inregs.x.bx = (unsigned long) XFIXNUM (AREF (registers, 1)); + inregs.x.cx = (unsigned long) XFIXNUM (AREF (registers, 2)); + inregs.x.dx = (unsigned long) XFIXNUM (AREF (registers, 3)); + inregs.x.si = (unsigned long) XFIXNUM (AREF (registers, 4)); + inregs.x.di = (unsigned long) XFIXNUM (AREF (registers, 5)); + inregs.x.cflag = (unsigned long) XFIXNUM (AREF (registers, 6)); + inregs.x.flags = (unsigned long) XFIXNUM (AREF (registers, 7)); int86 (no, &inregs, &outregs); @@ -139,8 +139,8 @@ DEFUN ("msdos-memput", Fdos_memput, Sdos_memput, 2, 2, 0, for (i = 0; i < len; i++) { - CHECK_FIXNAT (AREF (vector, i)); - buf[i] = (unsigned char) XFIXNAT (AREF (vector, i)) & 0xFF; + CHECK_FIXNUM (AREF (vector, i)); + buf[i] = (unsigned char) XFIXNUM (AREF (vector, i)) & 0xFF; } dosmemput (buf, len, offs); diff --git a/src/lisp.h b/src/lisp.h index 077d2360654..a0619e64f20 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1195,7 +1195,7 @@ INLINE bool INLINE EMACS_INT XFIXNUM (Lisp_Object a) { - eassume (FIXNUMP (a)); + eassert (FIXNUMP (a)); return XFIXNUM_RAW (a); } @@ -1209,7 +1209,7 @@ XUFIXNUM_RAW (Lisp_Object a) INLINE EMACS_UINT XUFIXNUM (Lisp_Object a) { - eassume (FIXNUMP (a)); + eassert (FIXNUMP (a)); return XUFIXNUM_RAW (a); } @@ -2828,9 +2828,11 @@ FIXNATP (Lisp_Object x) INLINE EMACS_INT XFIXNAT (Lisp_Object a) { - eassume (FIXNATP (a)); + eassert (FIXNUMP (a)); EMACS_INT int0 = Lisp_Int0; - return USE_LSB_TAG ? XFIXNUM (a) : XLI (a) - (int0 << VALBITS); + EMACS_INT result = USE_LSB_TAG ? XFIXNUM (a) : XLI (a) - (int0 << VALBITS); + eassume (0 <= result); + return result; } INLINE bool |