summaryrefslogtreecommitdiff
path: root/mpz/inp_str.c
diff options
context:
space:
mode:
authorTorbjorn Granlund <tg@gmplib.org>2016-08-29 16:48:20 +0200
committerTorbjorn Granlund <tg@gmplib.org>2016-08-29 16:48:20 +0200
commit9deac7786c2eebbb7bdb805a544e7f7f0f3f86d3 (patch)
treeae5c0ede128c654a480e12668b60b5625b409854 /mpz/inp_str.c
parentd6b531d0501182336bed7d7c799fee506c756867 (diff)
downloadgmp-9deac7786c2eebbb7bdb805a544e7f7f0f3f86d3.tar.gz
Use __GMP_ALLOCATE_FUNC_TYPE and friends.
Diffstat (limited to 'mpz/inp_str.c')
-rw-r--r--mpz/inp_str.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mpz/inp_str.c b/mpz/inp_str.c
index 474bc6843..a71bf2f97 100644
--- a/mpz/inp_str.c
+++ b/mpz/inp_str.c
@@ -132,7 +132,7 @@ mpz_inp_str_nowhite (mpz_ptr x, FILE *stream, int base, int c, size_t nread)
}
alloc_size = 100;
- str = (char *) (*__gmp_allocate_func) (alloc_size);
+ str = __GMP_ALLOCATE_FUNC_TYPE (alloc_size, char);
str_size = 0;
while (c != EOF)
@@ -145,7 +145,7 @@ mpz_inp_str_nowhite (mpz_ptr x, FILE *stream, int base, int c, size_t nread)
{
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++] = dig;
c = getc (stream);