aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
authorKarl Heuer1994-10-06 22:39:18 +0000
committerKarl Heuer1994-10-06 22:39:18 +0000
commit702672da3ce7e08fabd27a42586fe2fe08b35e26 (patch)
tree125a19579bf1e482a70f31a160eb72117fb06037 /src/data.c
parentdb37cb37320e2d9682ec88f00f1bfa01f7a96f46 (diff)
downloademacs-702672da3ce7e08fabd27a42586fe2fe08b35e26.tar.gz
emacs-702672da3ce7e08fabd27a42586fe2fe08b35e26.zip
(Flsh, Fadd1, Fsub1, Flognot): Don't use XFASTINT when negative.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/data.c b/src/data.c
index b380755a7db..c8ac73e9519 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1962,9 +1962,9 @@ In this case, zeros are shifted in on the left.")
1962 CHECK_NUMBER (num2, 1); 1962 CHECK_NUMBER (num2, 1);
1963 1963
1964 if (XINT (num2) > 0) 1964 if (XINT (num2) > 0)
1965 XSETINT (val, (unsigned) XFASTINT (num1) << XFASTINT (num2)); 1965 XSETINT (val, (EMACS_UINT) XUINT (num1) << XFASTINT (num2));
1966 else 1966 else
1967 XSETINT (val, (unsigned) XFASTINT (num1) >> -XINT (num2)); 1967 XSETINT (val, (EMACS_UINT) XUINT (num1) >> -XINT (num2));
1968 return val; 1968 return val;
1969} 1969}
1970 1970
@@ -1983,7 +1983,7 @@ Markers are converted to integers.")
1983 CHECK_NUMBER_COERCE_MARKER (num, 0); 1983 CHECK_NUMBER_COERCE_MARKER (num, 0);
1984#endif /* LISP_FLOAT_TYPE */ 1984#endif /* LISP_FLOAT_TYPE */
1985 1985
1986 XSETINT (num, XFASTINT (num) + 1); 1986 XSETINT (num, XINT (num) + 1);
1987 return num; 1987 return num;
1988} 1988}
1989 1989
@@ -2002,7 +2002,7 @@ Markers are converted to integers.")
2002 CHECK_NUMBER_COERCE_MARKER (num, 0); 2002 CHECK_NUMBER_COERCE_MARKER (num, 0);
2003#endif /* LISP_FLOAT_TYPE */ 2003#endif /* LISP_FLOAT_TYPE */
2004 2004
2005 XSETINT (num, XFASTINT (num) - 1); 2005 XSETINT (num, XINT (num) - 1);
2006 return num; 2006 return num;
2007} 2007}
2008 2008
@@ -2012,7 +2012,7 @@ DEFUN ("lognot", Flognot, Slognot, 1, 1, 0,
2012 register Lisp_Object num; 2012 register Lisp_Object num;
2013{ 2013{
2014 CHECK_NUMBER (num, 0); 2014 CHECK_NUMBER (num, 0);
2015 XSETINT (num, ~XFASTINT (num)); 2015 XSETINT (num, ~XINT (num));
2016 return num; 2016 return num;
2017} 2017}
2018 2018