Skip to content

Commit 633b368

Browse files
committed
Fix build with flint 3.1
1 parent acbe15d commit 633b368

File tree

6 files changed

+4
-40
lines changed

6 files changed

+4
-40
lines changed

src/sage/doctest/control.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@
5858

5959
auto_optional_tags = set()
6060

61-
try:
62-
from sage.libs.arb.arb_version import version as arb_vers
63-
arb_tag = 'arb2' + arb_vers().split('.')[1]
64-
auto_optional_tags.add(arb_tag)
65-
except ImportError:
66-
pass
67-
68-
6961
class DocTestDefaults(SageObject):
7062
"""
7163
This class is used for doctesting the Sage doctest module.

src/sage/libs/arb/arb_version.pyx

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/sage/libs/flint/flint_wrap.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@
136136
#include <flint/hypgeom.h>
137137
#include <flint/long_extras.h>
138138
#include <flint/mag.h>
139-
#include <flint/mpf_mat.h>
140-
#include <flint/mpf_vec.h>
141139
#include <flint/mpfr_mat.h>
142140
#include <flint/mpfr_vec.h>
143141
#include <flint/mpn_extras.h>

src/sage/libs/flint/fmpq.pxd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,12 @@ cdef extern from "flint_wrap.h":
4141
void fmpq_height(fmpz_t height, const fmpq_t x) noexcept
4242
flint_bitcnt_t fmpq_height_bits(const fmpq_t x) noexcept
4343
void fmpq_set_fmpz_frac(fmpq_t res, const fmpz_t p, const fmpz_t q) noexcept
44-
void fmpq_get_mpz_frac(mpz_t a, mpz_t b, fmpq_t c) noexcept
4544
void fmpq_set_si(fmpq_t res, slong p, ulong q) noexcept
4645
void _fmpq_set_si(fmpz_t rnum, fmpz_t rden, slong p, ulong q) noexcept
4746
void fmpq_set_ui(fmpq_t res, ulong p, ulong q) noexcept
4847
void _fmpq_set_ui(fmpz_t rnum, fmpz_t rden, ulong p, ulong q) noexcept
4948
void fmpq_set_mpq(fmpq_t dest, const mpq_t src) noexcept
5049
int fmpq_set_str(fmpq_t dest, const char * s, int base) noexcept
51-
void fmpq_init_set_mpz_frac_readonly(fmpq_t z, const mpz_t p, const mpz_t q) noexcept
5250
double fmpq_get_d(const fmpq_t f) noexcept
5351
void fmpq_get_mpq(mpq_t dest, const fmpq_t src) noexcept
5452
int fmpq_get_mpfr(mpfr_t dest, const fmpq_t src, mpfr_rnd_t rnd) noexcept

src/sage/symbolic/ginac/useries-flint.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
#include "flint/fmpq_poly.h"
2828
#include "flint/fmpq.h"
2929

30-
extern "C" void fmpq_get_mpz_frac(mpz_t a, mpz_t b, fmpq_t c);
31-
extern "C" void fmpq_init_set_mpz_frac_readonly(fmpq_t z, const mpz_t p, const mpz_t q);
32-
3330
#include <stdexcept>
3431

3532

src/sage/symbolic/ginac/useries.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,14 +550,16 @@ void power::useries(flint_series_t& fp, int order) const
550550
mpz_t cnum, cden;
551551
mpz_init(cnum);
552552
mpz_init(cden);
553-
fmpq_get_mpz_frac(cnum, cden, c);
553+
fmpz_get_mpz(cnum, fmpq_numref(c));
554+
fmpz_get_mpz(cden, fmpq_denref(c));
554555
if (not mpz_perfect_square_p(cnum)
555556
or not mpz_perfect_square_p(cden))
556557
throw flint_error();
557558
mpz_sqrt(cnum, cnum);
558559
mpz_sqrt(cden, cden);
559560
fmpq_t cc;
560-
fmpq_init_set_mpz_frac_readonly(cc, cnum, cden);
561+
fmpz_init_set_readonly(fmpq_numref(cc), cnum);
562+
fmpz_init_set_readonly(fmpq_denref(cc), cden);
561563
mpz_clear(cnum);
562564
mpz_clear(cden);
563565

0 commit comments

Comments
 (0)