Sept. 29, 2019
11:24 p.m.
On 9/29/2019 5:13 PM, Victor Stinner wrote:
It seems simpler to me to pass the structure size rather than the Python version. It avoids the risk of updating the structure without update the Python version. I also avoids to have to change the Python version immediately when PyConfig is modified.
In Win32, Microsoft does this a lot. For example, https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-wndcla...
The main risk of sizeof(PyConfig) comes if we *remove* a field and add a new field of the same size: the structure size doesn't change... But in my experience, we only add new ways to configure Pyhon, we never remove old ones :-D
I agree this is unlikely. Eric