diff options
Diffstat (limited to 'mpf')
-rw-r--r-- | mpf/get_str.c | 2 | ||||
-rw-r--r-- | mpf/inp_str.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/mpf/get_str.c b/mpf/get_str.c index 682819daa..0bfd99fe4 100644 --- a/mpf/get_str.c +++ b/mpf/get_str.c @@ -170,7 +170,7 @@ mpf_get_str (char *dbuf, mp_exp_t *exp, int base, size_t n_digits, mpf_srcptr u) /* We didn't get a string from the user. Allocate one (and return a pointer to it) with space for `-' and terminating null. */ alloc_size = n_digits + 2; - dbuf = (char *) (*__gmp_allocate_func) (n_digits + 2); + dbuf = __GMP_ALLOCATE_FUNC_TYPE (n_digits + 2, char); } if (un == 0) diff --git a/mpf/inp_str.c b/mpf/inp_str.c index 45cc34ceb..3db589705 100644 --- a/mpf/inp_str.c +++ b/mpf/inp_str.c @@ -47,7 +47,7 @@ mpf_inp_str (mpf_ptr rop, FILE *stream, int base) stream = stdin; alloc_size = 100; - str = (char *) (*__gmp_allocate_func) (alloc_size); + str = __GMP_ALLOCATE_FUNC_TYPE (alloc_size, char); str_size = 0; nread = 0; @@ -65,7 +65,7 @@ mpf_inp_str (mpf_ptr rop, FILE *stream, int base) { size_t old_alloc_size = alloc_size; alloc_size = alloc_size * 3 / 2; - str = (char *) (*__gmp_reallocate_func) (str, old_alloc_size, alloc_size); + str = __GMP_REALLOCATE_FUNC_TYPE (str, old_alloc_size, alloc_size, char); } if (c == EOF || isspace (c)) break; @@ -79,7 +79,7 @@ mpf_inp_str (mpf_ptr rop, FILE *stream, int base) { size_t old_alloc_size = alloc_size; alloc_size = alloc_size * 3 / 2; - str = (char *) (*__gmp_reallocate_func) (str, old_alloc_size, alloc_size); + str = __GMP_REALLOCATE_FUNC_TYPE (str, old_alloc_size, alloc_size, char); } str[str_size] = 0; |