summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-03-06 11:35:49 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-03-06 11:35:49 +0000
commitbb86fd06ed68ecc844b1cfb803aab224364b7645 (patch)
treedab1b008df15393c4f74ad2f45c337f058014f10
parent6c0489c0e6862f097aa2daed30d3fbc410dd955b (diff)
downloadmpfr-bb86fd06ed68ecc844b1cfb803aab224364b7645.tar.gz
[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
-rw-r--r--src/mpfr.h4
1 files 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