STINNER Victor <vstin...@python.org> added the comment:

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.

----------
nosy: +vstinner

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42784>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to