Fix undefined behaviour in ``_testcapimodule.c``.