mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-130931: Add pycore_typedefs.h internal header (#131396)
Declare _PyInterpreterFrame and _PyRuntimeState types before declaring their structure members. Break reference cycles between header files.
This commit is contained in:
parent
a0478c9f0c
commit
b8367e7cf3
14 changed files with 57 additions and 28 deletions
|
@ -9,6 +9,8 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include "pycore_frame.h"
|
||||
#include "pycore_typedefs.h" // _PyInterpreterFrame
|
||||
|
||||
|
||||
/* _PyGenObject_HEAD defines the initial segment of generator
|
||||
and coroutine objects. */
|
||||
|
@ -27,7 +29,7 @@ extern "C" {
|
|||
char prefix##_running_async; \
|
||||
/* The frame */ \
|
||||
int8_t prefix##_frame_state; \
|
||||
struct _PyInterpreterFrame prefix##_iframe; \
|
||||
_PyInterpreterFrame prefix##_iframe; \
|
||||
|
||||
struct _PyGenObject {
|
||||
/* The gi_ prefix is intended to remind of generator-iterator. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue