diff options
| author | Paul Eggert | 2018-09-04 09:30:57 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-09-04 09:31:53 -0700 |
| commit | 1d84e6523250ab6d14f40fba3922c56d7a40416f (patch) | |
| tree | 74155ea37e750ad19bc327fb3165b2cfd9440573 /src/alloc.c | |
| parent | fe042e9d15da7863b5beb4c2cc326a62d2c7fccb (diff) | |
| download | emacs-1d84e6523250ab6d14f40fba3922c56d7a40416f.tar.gz emacs-1d84e6523250ab6d14f40fba3922c56d7a40416f.zip | |
Fix bignum initialization
Problem reported by Andy Moreton in:
https://lists.gnu.org/r/emacs-devel/2018-09/msg00072.html
and crystal-ball diagnosis by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-09/msg00075.html
* src/alloc.c (xrealloc_for_gmp, xfree_for_gmp): Move to bignum.c.
(init_alloc): Move bignum initialization to init_bignum.
* src/bignum.c (init_bignum): Rename from init_bignum_once.
All users changed.
* src/emacs.c (main): Call init_bignum after init_alloc,
instead of calling init_bignum_once after init_bignum.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/alloc.c b/src/alloc.c index 1eab82d1c2b..28ca7804ee9 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -7126,18 +7126,6 @@ range_error (void) | |||
| 7126 | xsignal0 (Qrange_error); | 7126 | xsignal0 (Qrange_error); |
| 7127 | } | 7127 | } |
| 7128 | 7128 | ||
| 7129 | static void * | ||
| 7130 | xrealloc_for_gmp (void *ptr, size_t ignore, size_t size) | ||
| 7131 | { | ||
| 7132 | return xrealloc (ptr, size); | ||
| 7133 | } | ||
| 7134 | |||
| 7135 | static void | ||
| 7136 | xfree_for_gmp (void *ptr, size_t ignore) | ||
| 7137 | { | ||
| 7138 | xfree (ptr); | ||
| 7139 | } | ||
| 7140 | |||
| 7141 | /* Initialization. */ | 7129 | /* Initialization. */ |
| 7142 | 7130 | ||
| 7143 | void | 7131 | void |
| @@ -7171,10 +7159,6 @@ init_alloc_once (void) | |||
| 7171 | void | 7159 | void |
| 7172 | init_alloc (void) | 7160 | init_alloc (void) |
| 7173 | { | 7161 | { |
| 7174 | eassert (mp_bits_per_limb == GMP_NUMB_BITS); | ||
| 7175 | integer_width = 1 << 16; | ||
| 7176 | mp_set_memory_functions (xmalloc, xrealloc_for_gmp, xfree_for_gmp); | ||
| 7177 | |||
| 7178 | Vgc_elapsed = make_float (0.0); | 7162 | Vgc_elapsed = make_float (0.0); |
| 7179 | gcs_done = 0; | 7163 | gcs_done = 0; |
| 7180 | 7164 | ||