python/dnet.pyx: fix incompatible-function-pointer-types for modern compiler#104
Merged
ofalk merged 2 commits intoofalk:develfrom Apr 3, 2025
Merged
python/dnet.pyx: fix incompatible-function-pointer-types for modern compiler#104ofalk merged 2 commits intoofalk:develfrom
ofalk merged 2 commits intoofalk:develfrom
Conversation
…ompiler which is error now, see https://bugs.gentoo.org/933360, clang 19 (maybe earlier) has the same problem too Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
d20e067 to
de57a23
Compare
./dnet.c:8451:52: error: passing argument 2 of ‘PyObject_AsReadBuffer’ from incompatible pointer type [-Wincompatible-pointer-types]
8451 | __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_pkt, (&__pyx_v_p), (&__pyx_v_n)) == 0);
| ~^~~~~~~~~~~
| |
| char **
/usr/include/python3.12/abstract.h:370:52: note: expected ‘const void **’ but argument is of type ‘char **’
370 | const void **buffer,
| ~~~~~~~~~~~~~^~~~~~
./dnet.c:8451:66: error: passing argument 3 of ‘PyObject_AsReadBuffer’ from incompatible pointer type [-Wincompatible-pointer-types]
8451 | __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_pkt, (&__pyx_v_p), (&__pyx_v_n)) == 0);
| ~^~~~~~~~~~~
| |
| int *
/usr/include/python3.12/abstract.h:371:51: note: expected ‘Py_ssize_t *’ {aka ‘long int *’} but argument is of type ‘int *’
371 | Py_ssize_t *buffer_len);
| ~~~~~~~~~~~~^~~~~~~~~~
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Author
|
ping |
Owner
Thanks for the nudge. Looks good, I'll merge it. |
Closed
ofalk
added a commit
that referenced
this pull request
Jul 13, 2025
* Encoding fixes * CI Config (a few iterations) w/ Ubuntu and Windows target * Typo fixes * Fixes in icmp.h (#100 #101) - wrong size of fields for icmp4 timestamp message / 16bits are enough for Id/Seq. * Fix payload size of Netlink message (#99) - The `len` parameter of `NLMSG_LENGTH` was size of Netlink header instead of RtNetlink header. * python/dnet.pyx: fix incompatible-function-pointer-types for modern compiler (#104) * Cythonize with latest Cython (3.1) * Fix #109 PF_PACKET support detection to failure * tree-wide: regenerate autotools files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See https://bugs.gentoo.org/933360, clang 19 has same problem too