summaryrefslogtreecommitdiff
path: root/mpq/set_f.c
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2018-04-26 23:37:52 +0200
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2018-04-26 23:37:52 +0200
commit50af3bf618a4a1e693b129779ed8cbe7c88dc430 (patch)
treea1501d13d45123d95f4f7f916a90792ee97b00c1 /mpq/set_f.c
parent252c79afb2e57270a9b1c590ebc5db311a147642 (diff)
downloadgmp-50af3bf618a4a1e693b129779ed8cbe7c88dc430.tar.gz
mpq/: Support lazy mpq_t also in the denominator.
Diffstat (limited to 'mpq/set_f.c')
-rw-r--r--mpq/set_f.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mpq/set_f.c b/mpq/set_f.c
index a84d2d08b..14d4d0537 100644
--- a/mpq/set_f.c
+++ b/mpq/set_f.c
@@ -46,7 +46,7 @@ mpq_set_f (mpq_ptr q, mpf_srcptr f)
/* set q=0 */
SIZ(NUM(q)) = 0;
SIZ(DEN(q)) = 1;
- PTR(DEN(q))[0] = 1;
+ MPZ_NEWALLOC (DEN(q), 1)[0] = 1;
return;
}
@@ -65,7 +65,7 @@ mpq_set_f (mpq_ptr q, mpf_srcptr f)
SIZ(NUM(q)) = fsize >= 0 ? fexp : -fexp;
SIZ(DEN(q)) = 1;
- PTR(DEN(q))[0] = 1;
+ MPZ_NEWALLOC (DEN(q), 1)[0] = 1;
}
else
{