Skip to content
Prev Previous commit
Next Next commit
Add back gi_code field to PyGenObject and deprecate it.
  • Loading branch information
markshannon committed Feb 13, 2023
commit f7e9c7133e1982110cb078d6eb76b4752dd75015
5 changes: 4 additions & 1 deletion Include/cpython/genobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ extern "C" {
char prefix##_running_async; \
/* The frame */ \
int8_t prefix##_frame_state; \
PyObject *prefix##_iframe[1];
union { \
Py_DEPRECATED(3.12) PyCodeObject *prefix##_code; \
PyObject *prefix##_iframe[1]; \
};

typedef struct {
/* The gi_ prefix is intended to remind of generator-iterator. */
Expand Down