Commit 329e71a
committed
daemon: silence warning about casts for kwargs functions
[6/18] Compiling C object src/systemd/_daemon.cpython-313-x86_64-linux-gnu.so.p/_daemon.c.o
../src/systemd/_daemon.c:415:37: warning: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} [-Wcast-function-type]
415 | { "notify", (PyCFunction) notify, METH_VARARGS | METH_KEYWORDS, notify__doc__ },
| ^
../src/systemd/_daemon.c:416:37: warning: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} [-Wcast-function-type]
416 | { "_listen_fds", (PyCFunction) listen_fds, METH_VARARGS | METH_KEYWORDS, listen_fds__doc__ },
| ^
../src/systemd/_daemon.c:417:37: warning: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} [-Wcast-function-type]
417 | { "_listen_fds_with_names", (PyCFunction) listen_fds_with_names,
| ^
This is a problem in the Python C API… They should have used a union type.1 parent 35f146f commit 329e71a
2 files changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| 413 | + | |
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
| |||
424 | 425 | | |
425 | 426 | | |
426 | 427 | | |
| 428 | + | |
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
0 commit comments