Skip to content

Commit d48b33f

Browse files
committed
print fmpz_get_intlong
1 parent adcf70b commit d48b33f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/flint/types/fmpz.pyx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ cdef fmpz_get_intlong(fmpz_t x):
2020
"""
2121
cdef char * s
2222
if COEFF_IS_MPZ(x[0]):
23+
print("fmpz_get_intlong: 1")
2324
s = fmpz_get_str(NULL, 16, x)
24-
v = int(str_from_chars(s), 16)
25+
print("fmpz_get_intlong: 2")
26+
v = int(bytes(s).decode('ascii'), 16)
27+
print("fmpz_get_intlong: 3")
2528
libc.stdlib.free(s)
29+
print("fmpz_get_intlong: 4")
2630
return v
2731
else:
32+
print("fmpz_get_intlong: small")
2833
return <slong>x[0]
2934

3035
cdef int fmpz_set_any_ref(fmpz_t x, obj):

0 commit comments

Comments
 (0)