From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 2 Jun 2026 13:36:52 +0000 (+0200) Subject: [3.15] gh-150766: export `_PyGC_VisitFrameStack` and `_PyGC_VisitStackRef` functions... X-Git-Tag: v3.15.0b2~3 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=b17bcfdf7e716809254ba4e9168164bc81e8a2ca;p=thirdparty%2FPython%2Fcpython.git [3.15] gh-150766: export `_PyGC_VisitFrameStack` and `_PyGC_VisitStackRef` functions (GH-150767) (#150787) gh-150766: export `_PyGC_VisitFrameStack` and `_PyGC_VisitStackRef` functions (GH-150767) (cherry picked from commit df34a2f7122dcc6d230493b138e301675a290c49) Co-authored-by: Kumar Aditya --- diff --git a/Include/internal/pycore_gc.h b/Include/internal/pycore_gc.h index bfe52f42f114..84cbb56a9192 100644 --- a/Include/internal/pycore_gc.h +++ b/Include/internal/pycore_gc.h @@ -335,8 +335,9 @@ extern void _Py_RunGC(PyThreadState *tstate); union _PyStackRef; // GC visit callback for tracked interpreter frames -extern int _PyGC_VisitFrameStack(_PyInterpreterFrame *frame, visitproc visit, void *arg); -extern int _PyGC_VisitStackRef(union _PyStackRef *ref, visitproc visit, void *arg); +// GH-150766: exported for greenlet +PyAPI_FUNC(int) _PyGC_VisitFrameStack(_PyInterpreterFrame *frame, visitproc visit, void *arg); +PyAPI_FUNC(int) _PyGC_VisitStackRef(union _PyStackRef *ref, visitproc visit, void *arg); #ifdef Py_GIL_DISABLED extern void _PyGC_VisitObjectsWorldStopped(PyInterpreterState *interp,