From 0198d7342867e0372d0b25ef182b8b2ac37a551b Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Thu, 18 Jul 2013 09:12:21 -0700 Subject: [PATCH] Fix compilation bug Signed-off-by: Leonardo de Moura --- src/numerics/mpq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/numerics/mpq.h b/src/numerics/mpq.h index 4c96771c2..cd7ec5aa4 100644 --- a/src/numerics/mpq.h +++ b/src/numerics/mpq.h @@ -181,9 +181,9 @@ public: mpq operator--(int) { mpq r(*this); --(*this); return r; } // a <- numerator(b) - friend void numerator(mpz & a, mpq const & b) { mpz_set(a.m_val, mpq_numref(b.m_val)); } + friend void numerator(mpz & a, mpq const & b) { mpz_set(zval(a), mpq_numref(b.m_val)); } // a <- denominator(b) - friend void denominator(mpz & a, mpq const & b) { mpz_set(a.m_val, mpq_denref(b.m_val)); } + friend void denominator(mpz & a, mpq const & b) { mpz_set(zval(a), mpq_denref(b.m_val)); } mpz get_numerator() const { mpz r; numerator(r, *this); return r; } mpz get_denominator() const { mpz r; denominator(r, *this); return r; }