Skip to content

Commit 8fe156e

Browse files
committed
Use PyFloat_AS_DOUBLE again
1 parent 9457932 commit 8fe156e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/flint/types/arb.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cpython.float cimport PyFloat_AsDouble
1+
from cpython.float cimport PyFloat_AS_DOUBLE
22
from cpython.long cimport PyLong_Check
33

44
from flint.flint_base.flint_context cimport getprec
@@ -101,7 +101,7 @@ cdef int arb_set_python(arb_t x, obj, bint allow_conversion) except -1:
101101
return 1
102102

103103
if typecheck(obj, float):
104-
arf_set_d(arb_midref(x), PyFloat_AsDouble(obj))
104+
arf_set_d(arb_midref(x), PyFloat_AS_DOUBLE(obj))
105105
mag_zero(arb_radref(x))
106106
return 1
107107

src/flint/types/arf.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cpython.float cimport PyFloat_AsDouble
1+
from cpython.float cimport PyFloat_AS_DOUBLE
22
from flint.flint_base.flint_context cimport getprec
33
from flint.flint_base.flint_context cimport thectx
44
from flint.utils.typecheck cimport typecheck
@@ -44,7 +44,7 @@ cdef class arf:
4444
elif typecheck(val, arf):
4545
arf_set(self.val, (<arf>val).val)
4646
elif typecheck(val, float):
47-
arf_set_d(self.val, PyFloat_AsDouble(val))
47+
arf_set_d(self.val, PyFloat_AS_DOUBLE(val))
4848
elif typecheck(val, tuple):
4949
man = any_as_fmpz(val[0])
5050
exp = any_as_fmpz(val[1])

0 commit comments

Comments
 (0)