File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
graalpython/com.oracle.graal.python.cext/src Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -340,23 +340,16 @@ PyDoc_STRVAR(slice_doc,
340
340
slice(start, stop[, step])\n\
341
341
\n\
342
342
Create a slice object. This is used for extended slicing (e.g. a[0:10:2])." );
343
+ #endif // GraalPy change
343
344
344
345
static void
345
346
slice_dealloc (PySliceObject * r )
346
347
{
347
- PyInterpreterState * interp = _PyInterpreterState_GET ();
348
- _PyObject_GC_UNTRACK (r );
349
- Py_DECREF (r -> step );
350
- Py_DECREF (r -> start );
351
- Py_DECREF (r -> stop );
352
- if (interp -> slice_cache == NULL ) {
353
- interp -> slice_cache = r ;
354
- }
355
- else {
356
- PyObject_GC_Del (r );
357
- }
348
+ // GraalPy change: different implementation
349
+ GraalPyObject_GC_Del (r );
358
350
}
359
351
352
+ #if 0 // GraalPy change
360
353
static PyObject *
361
354
slice_repr (PySliceObject * r )
362
355
{
@@ -646,7 +639,7 @@ PyTypeObject PySlice_Type = {
646
639
"slice" , /* Name of this type */
647
640
sizeof (PySliceObject ), /* Basic object size */
648
641
0 , /* Item size for varobject */
649
- 0 , /* tp_dealloc */ // GraalPy change: nulled
642
+ ( destructor ) slice_dealloc , /* tp_dealloc */
650
643
0 , /* tp_vectorcall_offset */
651
644
0 , /* tp_getattr */
652
645
0 , /* tp_setattr */
You can’t perform that action at this time.
0 commit comments