From bb86fd06ed68ecc844b1cfb803aab224364b7645 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Sat, 6 Mar 2021 11:35:49 +0000 Subject: [src/mpfr.h] Fixed mpfr_get_prec and mpfr_get_exp macros. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14454 280ebfd0-de03-0410-8827-d642c229c3f4 --- src/mpfr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mpfr.h b/src/mpfr.h index 8232e472d..d3da54051 100644 --- a/src/mpfr.h +++ b/src/mpfr.h @@ -895,8 +895,8 @@ __MPFR_DECLSPEC int mpfr_total_order_p (mpfr_srcptr, mpfr_srcptr); /* Prevent them from using as lvalues */ #define MPFR_VALUE_OF(x) (0 ? (x) : (x)) -#define mpfr_get_prec(_x) MPFR_VALUE_OF((_x)->_mpfr_prec) -#define mpfr_get_exp(_x) MPFR_VALUE_OF((_x)->_mpfr_exp) +#define mpfr_get_prec(_x) MPFR_VALUE_OF(MPFR_SRCPTR(_x)->_mpfr_prec) +#define mpfr_get_exp(_x) MPFR_VALUE_OF(MPFR_SRCPTR(_x)->_mpfr_exp) /* Note 1: If need be, the MPFR_VALUE_OF can be used for other expressions (of any type). Thanks to Wojtek Lerch and Tim Rentsch for the idea. Note 2: Defining mpfr_get_exp() as a macro has the effect to disable -- cgit v1.2.1