Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/greenlet/TGreenlet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,13 @@ void GREENLET_NOINLINE(Greenlet::expose_frames)()
// directly. This is important since GetFrameObject might
// lazily _create_ the frame object and we don't want the
// interpreter to lose track of it.
//
#if !GREENLET_PY315
// This enum value was removed in
// https://github.com/python/cpython/pull/141108

assert(iframe_copy.owner != FRAME_OWNED_BY_CSTACK);
#endif

// We really want to just write:
// PyFrameObject* frame = _PyFrame_GetFrameObject(iframe);
Expand Down
6 changes: 6 additions & 0 deletions src/greenlet/greenlet_cpython_compat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ Greenlet won't compile on anything older than Python 3.11 alpha 4 (see
# define GREENLET_PY314 0
#endif

#if PY_VERSION_HEX >= 0x30F0000
# define GREENLET_PY315 1
#else
# define GREENLET_PY315 0
#endif

#ifndef Py_SET_REFCNT
/* Py_REFCNT and Py_SIZE macros are converted to functions
https://bugs.python.org/issue39573 */
Expand Down