mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-06 05:52:32 -08:00
* floatfns.c (Flog): Don't forget to declare the BASE argument a
Lisp_Object. * floatfns.c (Fexpt): Don't return the value of the XSET function call; that's not guaranteed to be the value assigned.
This commit is contained in:
parent
665d304655
commit
1cee204565
1 changed files with 3 additions and 2 deletions
|
|
@ -292,7 +292,8 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
|
|||
for (; y > 0; y--)
|
||||
acc *= x;
|
||||
}
|
||||
return XSET (x, Lisp_Int, acc);
|
||||
XFASTINT (x) = acc;
|
||||
return x;
|
||||
}
|
||||
f1 = (XTYPE (num1) == Lisp_Float) ? XFLOAT (num1)->data : XINT (num1);
|
||||
f2 = (XTYPE (num2) == Lisp_Float) ? XFLOAT (num2)->data : XINT (num2);
|
||||
|
|
@ -304,7 +305,7 @@ DEFUN ("log", Flog, Slog, 1, 2, 0,
|
|||
"Return the natural logarithm of NUM.
|
||||
If second optional argument BASE is given, return log NUM using that base.")
|
||||
(num, base)
|
||||
register Lisp_Object num;
|
||||
register Lisp_Object num, base;
|
||||
{
|
||||
double d = extract_float (num);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue