You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The typical initialization of PyMutex in its comment document cannot be compiled on Windows #115304
I don't understand the links above. pycore_lock.h, 28-29, are as listed, but have nothing obvious to do with commit 2939ad0 for a pydoc fix. Neither do those lines have any obvious connections with the compile error in random_value *= 1082527; in rotatingtree.c. The build report is not obviously linked back to a particular PR.
Hi @terryjreedy the compile error in the link should be:
3>D:\a\cpython\cpython\Modules\rotatingtree.c(19,16): error C2099: initializer is not a constant [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj] (I'll update this to the first comment, sorry I forgot it yesterday)
And change the usage to PyMutex m = {0}; got compile passed on Windows, see the commits in #115301
commit 2939ad0 have no connections to this issue, I guess you mixed this with other issues?
cpython/Include/internal/pycore_lock.h
Lines 28 to 29 in 2939ad0
But it cannot be compiled outside a function on Windows: https://github.com/python/cpython/actions/runs/7862752441/job/21452578591 with this error:
Also check here be0427f#diff-266bed9d854389a88ddd0696e9a225a2570559901edf0e909de43dd1f49ce80aR19 to see the usage and the compile error.
Change it to
PyMutex m = {0};can resolve this issue.Linked PRs