Message412212
There is an on-going work to move more and more header files into Include/cpython/ subdirectory, or even to the Include/internal/ directory. Examples:
* bpo-35134: Move cellobject.h, classobject.h, context.h, funcobject.h, genobject.h and longintrepr.h to Include/cpython/
* bpo-45434: Move pystrhex.h to Include/internal/
C extensions must only use #include "Python.h":
https://docs.python.org/dev/c-api/intro.html#api-includes
Sadly, many project include directly "inner" header files like "longobject.h" and so this ong-going work break a few projects at each Python 3.x release.
In the meanwhile, you can reorder your include paths to put your project first, or rename object.h to different filename.
---
Yeah, if it wouldn't break any C extension, I would prefer to "hide" all "inner" files under a sub-directory, or by renaming them. But right now, it's possible. |
|
Date |
User |
Action |
Args |
2022-01-31 17:13:32 | vstinner | set | recipients:
+ vstinner, iritkatriel, bigbossbro08 |
2022-01-31 17:13:32 | vstinner | set | messageid: <1643649212.56.0.239419544376.issue42784@roundup.psfhosted.org> |
2022-01-31 17:13:32 | vstinner | link | issue42784 messages |
2022-01-31 17:13:32 | vstinner | create | |
|