From c8ed1926e59eda68441ebf8f91e5a9268892cdf9 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Fri, 15 Feb 2008 17:38:31 +0000 Subject: 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 --- tests/tlog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/tlog.c') diff --git a/tests/tlog.c b/tests/tlog.c index c11a4cc08..130002d9d 100644 --- a/tests/tlog.c +++ b/tests/tlog.c @@ -53,7 +53,7 @@ check2 (const char *as, mp_rnd_t rnd_mode, const char *res1s) { mpfr_t ta, tres; - mpfr_inits2 (53, ta, tres, (void *) 0); + mpfr_inits2 (53, ta, tres, (mpfr_ptr) 0); mpfr_set_str1 (ta, as); test_log (tres, ta, rnd_mode); @@ -66,7 +66,7 @@ check2 (const char *as, mp_rnd_t rnd_mode, const char *res1s) mpfr_out_str(stdout, 10, 0, tres, GMP_RNDN); exit (1); } - mpfr_clears (ta, tres, (void *) 0); + mpfr_clears (ta, tres, (mpfr_ptr) 0); } static void @@ -265,7 +265,7 @@ x_near_one (void) mpfr_dump (y); } - mpfr_clears (x, y, (void *) 0); + mpfr_clears (x, y, (mpfr_ptr) 0); } #define TEST_FUNCTION test_log -- cgit v1.2.1