Author vstinner
Recipients Kevin Mooney, gaige, mcepl, ned.deily, ronaldoussoren, vstinner
Date 2020-05-18.22:08:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589839712.43.0.523406520227.issue39026@roundup.psfhosted.org>
In-reply-to
Content
I propose to rename "cpython/initconfig.h" to "cpython/cpython_initconfig.h".

#include "cpython/initconfig.h"

would become:

#include "cpython/cpython_initconfig.h"

So it becomes possible to include a cpython_xxx.h header from another cpython_xxx.h header (as done py cpython/pystate.h which includes cpython/initconfig.h).

--

Maybe a simpler change is simply to remove #include "cpython/initconfig.h" from cpython/pystate.h. Currently, cpython/pystate.h is included indirectly by Python.h at line 137, whereas cpython/initconfig.h is included by Python.h at line 135 (two lines before).

C extensions must include "Python.h" first and when "Python.h" is used, pystate.h gets the cpython/initconfig.h definitions as expected.
History
Date User Action Args
2020-05-18 22:08:32vstinnersetrecipients: + vstinner, ronaldoussoren, ned.deily, mcepl, gaige, Kevin Mooney
2020-05-18 22:08:32vstinnersetmessageid: <1589839712.43.0.523406520227.issue39026@roundup.psfhosted.org>
2020-05-18 22:08:32vstinnerlinkissue39026 messages
2020-05-18 22:08:32vstinnercreate