diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-02-15 17:38:31 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-02-15 17:38:31 +0000 |
commit | c8ed1926e59eda68441ebf8f91e5a9268892cdf9 (patch) | |
tree | 58123ad4f453b7758f9846448db8204ecc552c99 /tests/terf.c | |
parent | dad2bf1ef4af25fe87fe24f7ac295fb292987d6d (diff) | |
download | mpfr-c8ed1926e59eda68441ebf8f91e5a9268892cdf9.tar.gz |
For the terminating null pointer of the functions mpfr_inits,
mpfr_inits2, mpfr_clears, always use the type mpfr_ptr (no longer
void *). Updated the description of these functions in the manual
(mpfr.texi). The reason is that the C standard does not guarantee
that (void *) 0 has the same representation as a null pointer to
a structure (and even the same size). In most C implementations,
the representations are the same, but one never knows (dynamical
checking is also always possible)...
The change has been done with: perl -pi -e \
's/(mpfr_(clear|init)s.*)\(void *\*\) *0\)/$1(mpfr_ptr) 0)/' **/*.c
under zsh.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5290 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/terf.c')
-rw-r--r-- | tests/terf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/terf.c b/tests/terf.c index 8587a1b1d..b869ac8c9 100644 --- a/tests/terf.c +++ b/tests/terf.c @@ -366,7 +366,7 @@ special_erfc (void) { mpfr_t x, y; - mpfr_inits (x, y, (void *) 0); + mpfr_inits (x, y, (mpfr_ptr) 0); /* erfc (NaN) = NaN */ mpfr_set_nan (x); @@ -407,7 +407,7 @@ special_erfc (void) exit (1); } - mpfr_clears (x, y, (void *) 0); + mpfr_clears (x, y, (mpfr_ptr) 0); } static void @@ -522,7 +522,7 @@ test_erfc (void) mpfr_t x, y, z; int inex; - mpfr_inits2 (40, x, y, z, (void *) 0); + mpfr_inits2 (40, x, y, z, (mpfr_ptr) 0); mpfr_set_si_2exp (x, -1, -10, GMP_RNDN); mpfr_set_str_binary (z, "0.1000000000100100000110111010110111100000E1"); @@ -544,7 +544,7 @@ test_erfc (void) inex = mpfr_erfc (x, x, GMP_RNDN); MPFR_ASSERTN(inex > 0 && mpfr_cmp_ui (x, 2) == 0); - mpfr_clears (x, y, z, (void *) 0); + mpfr_clears (x, y, z, (mpfr_ptr) 0); } int |