diff options
| author | Richard M. Stallman | 1993-06-12 07:19:24 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-06-12 07:19:24 +0000 |
| commit | 4be1d460883bc7386caf514f1817d09238a2754d (patch) | |
| tree | 119a204e834e0d55f8bd9f2f5cb52f326f7572a5 /src/floatfns.c | |
| parent | 5ce8bb89cfb5829fe24a09a330ebd2ea367ef885 (diff) | |
| download | emacs-4be1d460883bc7386caf514f1817d09238a2754d.tar.gz emacs-4be1d460883bc7386caf514f1817d09238a2754d.zip | |
(Fexpt): New local `val' for making integer to return.
Diffstat (limited to 'src/floatfns.c')
| -rw-r--r-- | src/floatfns.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/floatfns.c b/src/floatfns.c index ca50a920f3c..90a2186d3f6 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -406,7 +406,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, | |||
| 406 | (XTYPE (arg2) == Lisp_Int)) /* don't promote, if both are ints */ | 406 | (XTYPE (arg2) == Lisp_Int)) /* don't promote, if both are ints */ |
| 407 | { /* this can be improved by pre-calculating */ | 407 | { /* this can be improved by pre-calculating */ |
| 408 | int acc, x, y; /* some binary powers of x then accumulating */ | 408 | int acc, x, y; /* some binary powers of x then accumulating */ |
| 409 | /* these, thereby saving some time. -wsr */ | 409 | Lisp_Object val; |
| 410 | |||
| 410 | x = XINT (arg1); | 411 | x = XINT (arg1); |
| 411 | y = XINT (arg2); | 412 | y = XINT (arg2); |
| 412 | acc = 1; | 413 | acc = 1; |
| @@ -431,8 +432,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, | |||
| 431 | y = (unsigned)y >> 1; | 432 | y = (unsigned)y >> 1; |
| 432 | } | 433 | } |
| 433 | } | 434 | } |
| 434 | XSET (x, Lisp_Int, acc); | 435 | XSET (val, Lisp_Int, acc); |
| 435 | return x; | 436 | return val; |
| 436 | } | 437 | } |
| 437 | f1 = (XTYPE (arg1) == Lisp_Float) ? XFLOAT (arg1)->data : XINT (arg1); | 438 | f1 = (XTYPE (arg1) == Lisp_Float) ? XFLOAT (arg1)->data : XINT (arg1); |
| 438 | f2 = (XTYPE (arg2) == Lisp_Float) ? XFLOAT (arg2)->data : XINT (arg2); | 439 | f2 = (XTYPE (arg2) == Lisp_Float) ? XFLOAT (arg2)->data : XINT (arg2); |