Skip to content

Commit

Permalink
Import from flint.flintlib instead of flint._flint
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarbenjamin committed Sep 6, 2023
1 parent 4a65ad5 commit 8ad8919
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 43 deletions.
24 changes: 0 additions & 24 deletions src/flint/_flint.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -70,30 +70,6 @@ cdef extern from *:
"""
slong pylong_as_slong(PyObject *pylong, int *overflow)

from flint.flintlib.nmod_poly cimport nmod_poly_t
from flint.flintlib.nmod_mat cimport nmod_mat_t
from flint.flintlib.fmpz cimport fmpz_t
from flint.flintlib.fmpz_poly cimport fmpz_poly_t, fmpz_poly_struct
from flint.flintlib.fmpz_mat cimport fmpz_mat_struct, fmpz_mat_t
from flint.flintlib.fmpq cimport fmpq_t, fmpq_struct
from flint.flintlib.fmpq_poly cimport fmpq_poly_struct, fmpq_poly_t
from flint.flintlib.fmpq_mat cimport fmpq_mat_t
from flint.flintlib.mag cimport mag_struct, mag_t, mag_ptr, mag_srcptr

from flint.flintlib.arf cimport arf_struct, arf_t, arf_ptr, arf_srcptr, arf_rnd_t
from flint.flintlib.arb cimport arb_struct, arb_ptr, arb_srcptr, arb_t
from flint.flintlib.arb cimport arb_midref, arb_radref
from flint.flintlib.acb cimport acb_struct, acb_ptr, acb_srcptr, acb_t
from flint.flintlib.acb cimport acb_realref, acb_imagref
from flint.flintlib.arb_poly cimport arb_poly_struct, arb_poly_t
from flint.flintlib.arb_mat cimport arb_mat_struct, arb_mat_t
# from flint.flintlib.acb_poly cimport acb_poly_struct, acb_poly_t
# from flint.flintlib.acb_mat cimport acb_mat_struct, acb_mat_t
# from flint.flintlib.dirichlet cimport dirichlet_group_struct, dirichlet_group_t
# from flint.flintlib.dirichlet cimport dirichlet_char_struct, dirichlet_char_t
# from flint.flintlib.mpoly cimport ordering_t, mpoly_ctx_struct, mpoly_ctx_t



"""
cdef extern from "flint/fmpz_mpoly_factor.h":
Expand Down
2 changes: 1 addition & 1 deletion src/flint/flint_base/flint_context.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flint._flint cimport (
from flint.flintlib.arf cimport (
arf_rnd_t,
)

Expand Down
2 changes: 1 addition & 1 deletion src/flint/pyflint.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flint._flint cimport *
from flint.flintlib.arf cimport arf_rnd_t
from flint.flint_base.flint_base cimport flint_mat
from flint.flint_base.flint_base cimport flint_mpoly
from flint.flint_base.flint_base cimport flint_series
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/acb.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flint.flint_base.flint_base cimport flint_scalar
from flint._flint cimport acb_t
from flint.flintlib.acb cimport acb_t

cdef any_as_acb(x)
cdef any_as_acb_or_notimplemented(x)
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/arb.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flint.flint_base.flint_base cimport flint_scalar

from flint._flint cimport arb_t
from flint.flintlib.arb cimport arb_t

cdef any_as_arb_or_notimplemented(x)
cdef int arb_set_python(arb_t x, obj, bint allow_conversion) except -1
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/arb_mat.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flint.flint_base.flint_base cimport flint_mat
from flint._flint cimport arb_mat_t
from flint.flintlib.arb_mat cimport arb_mat_t

cdef class arb_mat(flint_mat):
cdef arb_mat_t val
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/arb_poly.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flint.flint_base.flint_base cimport flint_poly
from flint._flint cimport arb_poly_t
from flint.flintlib.arb_poly cimport arb_poly_t

cdef arb_poly_set_list(arb_poly_t poly, list val, long prec)

Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/arb_series.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flint.flint_base.flint_base cimport flint_series

from flint._flint cimport arb_poly_t
from flint.flintlib.arb_poly cimport arb_poly_t

cdef class arb_series(flint_series):
cdef arb_poly_t val
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/arf.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flint._flint cimport arf_t
from flint.flintlib.arf cimport arf_t

cdef class arf:
cdef arf_t val
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/fmpq.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flint.flint_base.flint_base cimport flint_scalar

from flint._flint cimport fmpq_t
from flint.flintlib.fmpq cimport fmpq_t

cdef any_as_fmpq(obj)
cdef class fmpq(flint_scalar):
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/fmpq_mat.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flint.flint_base.flint_base cimport flint_mat

from flint._flint cimport fmpq_mat_t
from flint.flintlib.fmpq_mat cimport fmpq_mat_t
from flint.types.fmpz cimport fmpz
from flint.types.fmpq cimport fmpq
from flint.types.fmpz_mat cimport fmpz_mat
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/fmpq_poly.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flint.flint_base.flint_base cimport flint_poly
from flint._flint cimport fmpq_poly_t
from flint.flintlib.fmpq_poly cimport fmpq_poly_t

cdef fmpq_poly_set_list(fmpq_poly_t poly, list val)
cdef any_as_fmpq_poly(obj)
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/fmpq_series.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flint.flint_base.flint_base cimport flint_series
from flint._flint cimport fmpq_poly_t
from flint.flintlib.fmpq_poly cimport fmpq_poly_t

cdef class fmpq_series(flint_series):
cdef fmpq_poly_t val
Expand Down
4 changes: 2 additions & 2 deletions src/flint/types/fmpz.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ from cpython.long cimport PyLong_Check
from flint.flint_base.flint_base cimport flint_scalar
from flint.utils.conversion cimport chars_from_str

from flint._flint cimport fmpz_t, slong, pylong_as_slong
from flint._flint cimport slong, pylong_as_slong
from flint._flint cimport PyObject
from flint.flintlib.fmpz cimport fmpz_set_str, fmpz_set_si
from flint.flintlib.fmpz cimport fmpz_t, fmpz_set_str, fmpz_set_si

from cpython.version cimport PY_MAJOR_VERSION

Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/fmpz_mat.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flint.flint_base.flint_base cimport flint_mat
from flint._flint cimport fmpz_mat_t
from flint.flintlib.fmpz_mat cimport fmpz_mat_t
from flint.types.fmpz cimport fmpz
cdef any_as_fmpz_mat(obj)

Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/fmpz_poly.pxd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

from flint.flint_base.flint_base cimport flint_poly

from flint._flint cimport fmpz_poly_t
from flint.flintlib.fmpz_poly cimport fmpz_poly_t

cdef fmpz_poly_set_list(fmpz_poly_t poly, list val)

Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/fmpz_series.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flint.flint_base.flint_base cimport flint_series

from flint._flint cimport fmpz_poly_t
from flint.flintlib.fmpz_poly cimport fmpz_poly_t

cdef class fmpz_series(flint_series):
cdef fmpz_poly_t val
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/nmod_mat.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flint.flint_base.flint_base cimport flint_mat

from flint._flint cimport nmod_mat_t
from flint.flintlib.nmod_mat cimport nmod_mat_t
from flint._flint cimport mp_limb_t

cdef class nmod_mat:
Expand Down
2 changes: 1 addition & 1 deletion src/flint/types/nmod_poly.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flint.flint_base.flint_base cimport flint_poly

from flint._flint cimport nmod_poly_t
from flint.flintlib.nmod_poly cimport nmod_poly_t
from flint._flint cimport mp_limb_t

cdef class nmod_poly(flint_poly):
Expand Down

0 comments on commit 8ad8919

Please sign in to comment.