[New-bugs-announce] [issue38542] Expose _PyGC_generation0 for allowing internal use directly from a CPython extension

egaudry report at bugs.python.org
Mon Oct 21 05:43:52 EDT 2019


New submission from egaudry <eg at fft.be>:

Hi

I would like to be able to get an handle on PyGC_Head*_PyGC_generation0 from a CPython extension.
This is possible when building Python on a Posix host, but not on Windows because of a missing PyAPI_DATA wrapping of the said object in the objimpl.h header.

Having the possibility to inspect the PyGC_Head here can be very useful when customizing the way a garbage-collectable object created from CPython extension would be cleaned/inspected, etc.

Any chance this patch could be added to get the same capabilities on Windows and Posix platforms ?

Thanks for your feedback,
Eloi

----------
components: Interpreter Core
files: gc.diff
keywords: patch
messages: 355034
nosy: egaudry
priority: normal
severity: normal
status: open
title: Expose _PyGC_generation0 for allowing internal use directly from a CPython extension
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48671/gc.diff

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38542>
_______________________________________


More information about the New-bugs-announce mailing list