diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-09-04 19:14:01 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-09-04 19:15:57 -0700 |
commit | ecb985c10d5241a65ab9552ebfcecaa150b35427 (patch) | |
tree | c4f12a76561d84518c597cb8e25cfd3813023456 /src/xdisp.c | |
parent | e3661f8c35b3057c58e8c0b474f597697ce413ba (diff) | |
download | emacs-ecb985c10d5241a65ab9552ebfcecaa150b35427.tar.gz |
Simplify bignum->intmax conversion
* src/lisp.h (integer_to_intmax, integer_to_uintmax): New functions.
* src/data.c (cons_to_unsigned, cons_to_signed)
(arith_driver):
* src/dbusbind.c (xd_extract_signed, xd_extract_unsigned):
* src/dispnew.c (sit_for):
* src/editfns.c (styled_format):
* src/emacs-module.c (module_extract_integer):
* src/fileio.c (file_offset):
* src/font.c (font_unparse_xlfd, Fopen_font):
* src/xdisp.c (calc_line_height_property):
* src/process.c (handle_child_signal):
Diffstat (limited to 'src/xdisp.c')
-rw-r--r-- | src/xdisp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 04033665d76..47286e25c80 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -27910,10 +27910,12 @@ calc_line_height_property (struct it *it, Lisp_Object val, struct font *font, /* FIXME: Check for overflow in multiplication or conversion. */ if (FLOATP (val)) height = (int)(XFLOAT_DATA (val) * height); - else if (FIXNUMP (val)) - height *= XFIXNUM (val); else - height *= bignum_to_intmax (val); + { + intmax_t v; + if (integer_to_intmax (val, &v)) + height *= v; + } return make_fixnum (height); } |