python-axolotl-curve25519
python-axolotl-curve25519 copied to clipboard
Correct types in PyModuleDef / fix compilation with new clang+gcc
The 4th variable of PyModuleDef is an int, not a pointer: https://docs.python.org/3/c-api/module.html#c.PyModuleDef
Fixes compilation with clang.
@tgalal could you please review? Currently, it is not possible to build python-axolotl-curve25519
with Clang.
I had the following error with Python 3.11 and this change solved the problem:
curve25519module.c:161:9: error: incompatible pointer to integer conversion initializing 'Py_ssize_t' (aka 'long') with an expression of type 'void *' [-Wint-conversion]
@hannob @tgalal what's the progress right now? has it fixed? we get this error in mac m1, python3.10, can not install python-axolotl-curve25519
This patch also fixes the build with GCC 14. Would be great if it could be merged.