GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Simplify code after merge · python/cpython@cd3d83d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Python
    • gc_free_threading.c
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Python/gc_free_threading.c‎

Copy file name to clipboardExpand all lines: Python/gc_free_threading.c
+3-7Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ merge_refcount(PyObject *op, Py_ssize_t extra)
181181
}
182182

183183
static void
184-
frame_disable_deferred_refcounting(_PyInterpreterFrame *frame, int is_funcobj_valid)
184+
frame_disable_deferred_refcounting(_PyInterpreterFrame *frame)
185185
{
186186
// Convert locals, variables, and the executable object to strong
187187
// references from (possibly) deferred references.
@@ -232,14 +232,10 @@ disable_deferred_refcounting(PyObject *op)
232232
// use strong references, in case the generator or frame object is
233233
// resurrected by a finalizer.
234234
if (PyGen_CheckExact(op) || PyCoro_CheckExact(op) || PyAsyncGen_CheckExact(op)) {
235-
// The `f_funcobj` field is invalid if the frame is a cleared generator
236-
PyGenObject *gen = (PyGenObject *)op;
237-
int is_funcobj_valid = gen->gi_frame_state != FRAME_CLEARED;
238-
239-
frame_disable_deferred_refcounting(&gen->gi_iframe, is_funcobj_valid);
235+
frame_disable_deferred_refcounting(&((PyGenObject *)op)->gi_iframe);
240236
}
241237
else if (PyFrame_Check(op)) {
242-
frame_disable_deferred_refcounting(((PyFrameObject *)op)->f_frame, 1);
238+
frame_disable_deferred_refcounting(((PyFrameObject *)op)->f_frame);
243239
}
244240
}
245241

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.