Export converting mpz to [u]intmax
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 3 Oct 2018 16:10:01 +0000 (09:10 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 7 Oct 2018 06:31:04 +0000 (23:31 -0700)
commit84f39d3389209e566dde9acbdd78f5572f0c6751
treead9788f26ffd9e9ceb7a520ed863833a5b60db8b
parent0faad0a0025cb4c6cbdba44e5b259690fae27b1a
Export converting mpz to [u]intmax

This refactoring will help improve timestamp handling later
(Bug#32902).
* src/bignum.c (mpz_set_uintmax): Move to bignum.h,
and make inline.
(mpz_set_uintmax_slow): Now extern.
(mpz_to_intmax, mpz_to_uintmax): New functions, with
implementation taken from the old bignum_to_intmax
and bignum_to_uintmax.
(bignum_to_intmax, bignum_to_uintmax): Use them.
src/bignum.c
src/bignum.h