From 19306a423644a407c2e8bc4dbbba90ad80a58e8e Mon Sep 17 00:00:00 2001 From: nybblista <170842536+nybblista@users.noreply.github.com> Date: Fri, 9 May 2025 15:13:08 +0300 Subject: [PATCH 1/2] Fix the _PyGenObject_HEAD reference in the generators.md --- InternalDocs/generators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InternalDocs/generators.md b/InternalDocs/generators.md index 87fbb91236844b..1a2ce2fb812f99 100644 --- a/InternalDocs/generators.md +++ b/InternalDocs/generators.md @@ -28,7 +28,7 @@ interpreter state. The `frame` of a generator is embedded in the generator object struct as a [`_PyInterpreterFrame`](frames.md) (see `_PyGenObject_HEAD` in -[`pycore_genobject.h`](../Include/internal/pycore_genobject.h)). +[`pycore_interpframe_structs.h`](../Include/internal/pycore_interpframe_structs.h)). This means that we can get the frame from the generator or the generator from the frame (see `_PyGen_GetGeneratorFromFrame` in the same file). Other fields of the generator struct include metadata (such as the name of From 1176e144ed7ad06a7472a78cb1eb075eb52d1116 Mon Sep 17 00:00:00 2001 From: nybblista <170842536+nybblista@users.noreply.github.com> Date: Fri, 9 May 2025 15:28:36 +0300 Subject: [PATCH 2/2] Fix the _PyGen_GetGeneratorFromFrame reference in the generators.md --- InternalDocs/generators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InternalDocs/generators.md b/InternalDocs/generators.md index 1a2ce2fb812f99..979a5b51521e4e 100644 --- a/InternalDocs/generators.md +++ b/InternalDocs/generators.md @@ -30,7 +30,7 @@ The `frame` of a generator is embedded in the generator object struct as a [`_PyInterpreterFrame`](frames.md) (see `_PyGenObject_HEAD` in [`pycore_interpframe_structs.h`](../Include/internal/pycore_interpframe_structs.h)). This means that we can get the frame from the generator or the generator -from the frame (see `_PyGen_GetGeneratorFromFrame` in the same file). +from the frame (see `_PyGen_GetGeneratorFromFrame` in [`pycore_genobject.h`](../Include/internal/pycore_genobject.h)). Other fields of the generator struct include metadata (such as the name of the generator function) and runtime state information (such as whether its frame is executing, suspended, cleared, etc.).