Skip to content

Commit

Permalink
PyLong_AsLong in convert.pxd
Browse files Browse the repository at this point in the history
see #169
  • Loading branch information
fchapoton authored Jan 1, 2025
1 parent 7408a05 commit 066724a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cypari2/convert.pxd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .paridecl cimport (GEN, t_COMPLEX, dbltor, real_0_bit, stoi, cgetg,
set_gel, gen_0)
from .gen cimport Gen
from cpython.int cimport PyInt_AS_LONG
from cpython.long cimport PyLong_AsLong
from cpython.float cimport PyFloat_AS_DOUBLE
from cpython.complex cimport PyComplex_RealAsDouble, PyComplex_ImagAsDouble
from cpython.longintrepr cimport py_long
Expand Down Expand Up @@ -58,7 +58,7 @@ cdef inline GEN doubles_to_COMPLEX(double re, double im) noexcept:
# Conversion Python -> PARI

cdef inline GEN PyInt_AS_GEN(x) except? NULL:
return stoi(PyInt_AS_LONG(x))
return stoi(PyLong_AsLong(x))

cdef GEN PyLong_AS_GEN(py_long x) noexcept

Expand Down

0 comments on commit 066724a

Please sign in to comment.