Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyLong_AsLong in convert.pxd #171

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading