https://bugs.freedesktop.org/show_bug.cgi?id=101618
Bug ID: 101618
Summary: wl_array_for_each is not C++ compliant
Product: Wayland
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: trivial
Priority: medium
Component: wayland
Assignee: [email protected]
Reporter: [email protected]
Hi,
We've faced an issue, when we used wl_array_for_each in our C++ wayland client
implementation.
The problem is that one can't use wl_array_for_each(pos, array) when
pos is passed as uint32_t*, for example, and array->data is assigned to it. In
C++, one cannot just convert void* to other pointer type implicitly as in C.
Is it possible to modify the macro defined to have explicit type cast?
#define wl_array_for_each(pos, array) \
for (pos = (uint32_t*) (array)->data; \
or maybe intptr_t before (array)->data ??.
I'm not sure which one would be better, but it is to you to decide.
Br,
msisov
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
wayland-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs