This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients alex, christian.heimes, erlendaasland, miss-islington, petr.viktorin, pitrou, pmpp, serhiy.storchaka, skrah, vstinner
Date 2022-02-07.17:41:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644255680.87.0.666460529384.issue45459@roundup.psfhosted.org>
In-reply-to
Content
> There's some side effects with "buffer.h" inclusion in Panda3D when building againt 3.11a5, project manager concerns are here https://github.com/python/cpython/pull/29991#issuecomment-1031731100

Copy of rdb's message:
"""
This change broke our project build because when cpython/object.h is including buffer.h it is forcing it to resolve along the search path, and the compiler is hitting the buffer.h in our project rather than the one in the Python include directory.

Should it not be using a relative include, ie. #include "../buffer.h" ? I think otherwise this change will cause breakage for many projects given how common the header name "buffer.h" may be.
"""

In Python.h, buffer.h is included before object.h. But object.h includes buffer.h. I suggest to include buffer.h before object.h and remove #include "buffer.h" from Include/cpython/buffer.h.

Also, I agree that renaming buffer.h to pybuffer.h would reduce issues like that. Moreover, this header file exposes the "Py_buffer" API, so "pybuffer.h" sounds like a better name ;-)
History
Date User Action Args
2022-02-07 17:41:20vstinnersetrecipients: + vstinner, pitrou, christian.heimes, alex, petr.viktorin, skrah, pmpp, serhiy.storchaka, miss-islington, erlendaasland
2022-02-07 17:41:20vstinnersetmessageid: <1644255680.87.0.666460529384.issue45459@roundup.psfhosted.org>
2022-02-07 17:41:20vstinnerlinkissue45459 messages
2022-02-07 17:41:20vstinnercreate