[issue46303] _Py_stat and _Py_wstat using incorrect type for status argument
STINNER Victor
report at bugs.python.org
Tue Jan 11 19:15:09 EST 2022
STINNER Victor <vstinner at python.org> added the comment:
> Hi Victor, I was trying to compile with clang on Windows 10. I will try to pull your 3.11 changes and test. Sorry to cause so much churn. It looked to me like a simple issue that was missed, probably because whatever was trying to compile was not normally compiled on Windows. I was not trying to make a lot of work to support a new platform :)
I tried to write a change which doesn't increase the maintenance on other platforms.
I dislike declaring private functions in the *public* Python.h header file, especially if they cause build error. Over the last years, I moved many private functions to the internal C API.
In Python, we are trying to provide a same C API on all platforms. If "struct stat" is no longer considered as portable, IMO we should attempt to avoid it, at least in the public C API. For these reasons, I dislike PR 30478. The problem is that if the work is written on Linux using "strut stat", the build can fail on Windows if "struct _Py_stat_struct" is now required on Windows. I expected "struct stat" to be portable, but it seems like I was wrong.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46303>
_______________________________________
More information about the Python-bugs-list
mailing list