diff options
author | Ken Raeburn <raeburn@raeburn.org> | 1999-09-12 05:07:01 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@raeburn.org> | 1999-09-12 05:07:01 +0000 |
commit | 70949dac51f3e975477e6b1a38cc78625efc4a40 (patch) | |
tree | d0048c9a0b9bc18a9dd65e094b0fce43d1067f9b /src/floatfns.c | |
parent | e952bf4445863c01763f402389b38c00f77e024b (diff) | |
download | emacs-70949dac51f3e975477e6b1a38cc78625efc4a40.tar.gz |
Use XCAR, XCDR, XFLOAT_DATA instead of explicit member access.
Diffstat (limited to 'src/floatfns.c')
-rw-r--r-- | src/floatfns.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/floatfns.c b/src/floatfns.c index cd1c0c4441e..b989591cc81 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -222,7 +222,7 @@ extract_float (num) CHECK_NUMBER_OR_FLOAT (num, 0); if (FLOATP (num)) - return XFLOAT (num)->data; + return XFLOAT_DATA (num); return (double) XINT (num); } @@ -480,8 +480,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, XSETINT (val, acc); return val; } - f1 = FLOATP (arg1) ? XFLOAT (arg1)->data : XINT (arg1); - f2 = FLOATP (arg2) ? XFLOAT (arg2)->data : XINT (arg2); + f1 = FLOATP (arg1) ? XFLOAT_DATA (arg1) : XINT (arg1); + f2 = FLOATP (arg2) ? XFLOAT_DATA (arg2) : XINT (arg2); /* Really should check for overflow, too */ if (f1 == 0.0 && f2 == 0.0) f1 = 1.0; @@ -650,7 +650,7 @@ DEFUN ("abs", Fabs, Sabs, 1, 1, 0, CHECK_NUMBER_OR_FLOAT (arg, 0); if (FLOATP (arg)) - IN_FLOAT (arg = make_float (fabs (XFLOAT (arg)->data)), "abs", arg); + IN_FLOAT (arg = make_float (fabs (XFLOAT_DATA (arg))), "abs", arg); else if (XINT (arg) < 0) XSETINT (arg, - XINT (arg)); @@ -743,8 +743,8 @@ rounding_driver (arg, divisor, double_round, int_round2, name) { double f1, f2; - f1 = FLOATP (arg) ? XFLOAT (arg)->data : XINT (arg); - f2 = (FLOATP (divisor) ? XFLOAT (divisor)->data : XINT (divisor)); + f1 = FLOATP (arg) ? XFLOAT_DATA (arg) : XINT (arg); + f2 = (FLOATP (divisor) ? XFLOAT_DATA (divisor) : XINT (divisor)); if (! IEEE_FLOATING_POINT && f2 == 0) Fsignal (Qarith_error, Qnil); @@ -769,7 +769,7 @@ rounding_driver (arg, divisor, double_round, int_round2, name) { double d; - IN_FLOAT (d = (*double_round) (XFLOAT (arg)->data), name, arg); + IN_FLOAT (d = (*double_round) (XFLOAT_DATA (arg)), name, arg); FLOAT_TO_INT (d, arg, name, arg); } #endif @@ -890,8 +890,8 @@ fmod_float (x, y) { double f1, f2; - f1 = FLOATP (x) ? XFLOAT (x)->data : XINT (x); - f2 = FLOATP (y) ? XFLOAT (y)->data : XINT (y); + f1 = FLOATP (x) ? XFLOAT_DATA (x) : XINT (x); + f2 = FLOATP (y) ? XFLOAT_DATA (y) : XINT (y); if (! IEEE_FLOATING_POINT && f2 == 0) Fsignal (Qarith_error, Qnil); |