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/tsinh_cosh.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/tsinh_cosh.c')
-rw-r--r-- | tests/tsinh_cosh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/tsinh_cosh.c b/tests/tsinh_cosh.c index 2a16056c8..31f110b18 100644 --- a/tests/tsinh_cosh.c +++ b/tests/tsinh_cosh.c @@ -42,7 +42,7 @@ failed (mpfr_t x, mpfr_t esh, mpfr_t gsh, mpfr_t ech, mpfr_t gch) mpfr_out_str (stdout, 10, 0, gch, GMP_RNDD); putchar ('\n'); - mpfr_clears (x, esh, gsh, ech, gch, (void *) 0); + mpfr_clears (x, esh, gsh, ech, gch, (mpfr_ptr) 0); exit (1); } @@ -53,7 +53,7 @@ check (mpfr_t x, mp_rnd_t rnd) mpfr_t s, c, sx, cx; int isc, is, ic; - mpfr_inits2 (MPFR_PREC(x), s, c, sx, cx, (void *)0); + mpfr_inits2 (MPFR_PREC(x), s, c, sx, cx, (mpfr_ptr) 0); isc = mpfr_sinh_cosh (sx, cx, x, rnd); is = mpfr_sinh (s, x, rnd); @@ -63,7 +63,7 @@ check (mpfr_t x, mp_rnd_t rnd) failed (x, s, sx, c, cx); MPFR_ASSERTN (isc = is || ic); - mpfr_clears (s, c, sx, cx, (void *) 0); + mpfr_clears (s, c, sx, cx, (mpfr_ptr) 0); } static void |