diff options
author | Michael Droettboom <mdboom@gmail.com> | 2024-10-08 17:18:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-08 17:18:39 (GMT) |
commit | c6127af8685c2a9b416207e46089cee79d028b85 (patch) | |
tree | f7547bbcdcf3cf109a026410c4b81cc51b1c7316 /Objects/sliceobject.c | |
parent | 7dca7322cca7ff146444e56f28f21f1090987fff (diff) | |
download | cpython-c6127af8685c2a9b416207e46089cee79d028b85.zip cpython-c6127af8685c2a9b416207e46089cee79d028b85.tar.gz cpython-c6127af8685c2a9b416207e46089cee79d028b85.tar.bz2 |
gh-125063: Emit slices as constants in the bytecode compiler (#125064)
* Make slices marshallable
* Emit slices as constants
* Update Python/marshal.c
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* Refactor codegen_slice into two functions so it
always has the same net effect
* Fix for free-threaded builds
* Simplify marshal loading of slices
* Only return SUCCESS/ERROR from codegen_slice
---------
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Diffstat (limited to 'Objects/sliceobject.c')
-rw-r--r-- | Objects/sliceobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c index 1b6d359..4fef0af 100644 --- a/Objects/sliceobject.c +++ b/Objects/sliceobject.c @@ -343,7 +343,7 @@ Create a slice object. This is used for extended slicing (e.g. a[0:10:2])."); static void slice_dealloc(PySliceObject *r) { - _PyObject_GC_UNTRACK(r); + PyObject_GC_UnTrack(r); Py_DECREF(r->step); Py_DECREF(r->start); Py_DECREF(r->stop); |