gh-96821: Fix undefined behaviour in _testcapimodule.c
#96915
Merged
8000
_testcapimodule.c
#96915