I suspect this proposal contradicts with CPython movement to close as many implementation details as possible.
On Fri, Oct 18, 2019 at 9:28 PM Guido van Rossum <gu...@python.org> wrote: > > This looks like an issue for bugs.python.org. After opening a bug there you > could also try to fix this yourself and submit a Pull Request (see the Python > devguide). > > On Fri, Oct 18, 2019 at 3:10 AM GAUDRY Eloi <eloi.gau...@fft.be> wrote: >> >> 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 >> >> >> >> Index: Include/objimpl.h >> =================================================================== >> --- Include/objimpl.h (revision 118072) >> +++ Include/objimpl.h (working copy) >> @@ -258,7 +258,7 @@ >> double dummy; /* force worst-case alignment */ >> } PyGC_Head; >> >> -extern PyGC_Head *_PyGC_generation0; >> +PyAPI_DATA(PyGC_Head*) _PyGC_generation0; >> >> #define _Py_AS_GC(o) ((PyGC_Head *)(o)-1) >> >> _______________________________________________ >> Python-ideas mailing list -- python-ideas@python.org >> To unsubscribe send an email to python-ideas-le...@python.org >> https://mail.python.org/mailman3/lists/python-ideas.python.org/ >> Message archived at >> https://mail.python.org/archives/list/python-ideas@python.org/message/7FC2NHAOMKBHONFTUKMAHO5F56UU5UUD/ >> Code of Conduct: http://python.org/psf/codeofconduct/ > > > > -- > --Guido van Rossum (python.org/~guido) > Pronouns: he/him (why is my pronoun here?) > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/OOFEW4ZBKBOF6VEXDCEXSR6HIL7PGAMX/ > Code of Conduct: http://python.org/psf/codeofconduct/ -- Thanks, Andrew Svetlov _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/6VFDIAINEPKU2UDHCYAQ5OAHNAI7TNZK/ Code of Conduct: http://python.org/psf/codeofconduct/