Commit 10a45096 authored by Paul Eggert's avatar Paul Eggert

Fix misleading name ‘double_to_bignum’

* src/bignum.c (double_to_integer): Rename from double_to_bignum,
since the result is not necessarily a bignum.  All uses changed.
parent fe859a07
......@@ -64,9 +64,9 @@ bignum_to_double (Lisp_Object n)
return mpz_get_d (XBIGNUM (n)->value);
/* Return D, converted to a bignum. Discard any fraction. */
/* Return D, converted to a Lisp integer. Discard any fraction. */
double_to_bignum (double d)
double_to_integer (double d)
mpz_set_d (mpz[0], d);
return make_integer_mpz ();
......@@ -4657,7 +4657,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
/* Characters to be inserted after spaces and before
leading zeros. This can occur with bignums, since
string_to_bignum does only leading '-'. */
bignum_to_string does only leading '-'. */
char prefix[sizeof "-0x" - 1];
int prefixlen = 0;
......@@ -391,7 +391,7 @@ rounding_driver (Lisp_Object arg, Lisp_Object divisor,
return make_fixnum (ir);
return double_to_bignum (dr);
return double_to_integer (dr);
static EMACS_INT
......@@ -3327,7 +3327,7 @@ extern ptrdiff_t bignum_bufsize (Lisp_Object, int);
extern ptrdiff_t bignum_to_c_string (char *, ptrdiff_t, Lisp_Object, int);
extern Lisp_Object bignum_to_string (Lisp_Object, int);
extern Lisp_Object make_bignum_str (char const *, int);
extern Lisp_Object double_to_bignum (double);
extern Lisp_Object double_to_integer (double);
/* Converthe integer NUM to *N. Return true if successful, false
(possibly setting *N) otherwise. */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment