Skip to content

Commit 7f97b27

Browse files
committed
Fix build with -Werror=incompatible-pointer-types
And hence fix build with GCC 14 on Fedora 40+.
1 parent ff1748e commit 7f97b27

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/_crypt_r.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ crypt_r_crypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
8383

8484

8585
static PyMethodDef crypt_r_methods[] = {
86-
{"crypt", crypt_r_crypt, METH_FASTCALL, crypt_r_crypt__doc__},
86+
{"crypt", (PyCFunction)crypt_r_crypt, METH_FASTCALL, crypt_r_crypt__doc__},
8787
{NULL, NULL} /* sentinel */
8888
};
8989

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ env_list = py{311,312,313}
66
[testenv]
77
commands =
88
python tests/test_crypt_r.py {posargs}
9+
setenv =
10+
CFLAGS=-Werror=incompatible-pointer-types

0 commit comments

Comments
 (0)