File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ cdef extern from *:
59
59
ctypedef struct PyLongObject:
60
60
digit* ob_digit
61
61
62
- Py_ssize_t * Py_SIZE_PTR " &Py_SIZE " (object )
62
+ void __Pyx_SET_SIZE (object , Py_ssize_t )
63
63
64
64
65
65
# #######################################################################
@@ -450,13 +450,11 @@ cdef PyLong_FromINT(GEN g):
450
450
if d:
451
451
sizedigits_final = i+ 1
452
452
453
- # Set correct size (use a pointer to hack around Cython's
454
- # non-support for lvalues).
455
- cdef Py_ssize_t* sizeptr = Py_SIZE_PTR(x)
453
+ # Set correct size
456
454
if signe(g) > 0 :
457
- sizeptr[ 0 ] = sizedigits_final
455
+ __Pyx_SET_SIZE(x, sizedigits_final)
458
456
else :
459
- sizeptr[ 0 ] = - sizedigits_final
457
+ __Pyx_SET_SIZE(x, - sizedigits_final)
460
458
461
459
return x
462
460
You can’t perform that action at this time.
0 commit comments