I think both patches (and original code too obviously) are wrong - WL_DISPLAY_ERROR (opcode 0) event has signature "ous", so Quentin patch calls event with too many arguments and ignores types, and Marek patch calls event with too few arguments and incorrect type for the second argument. Imo, correct invocation should be either: wl_resource_post_event(res, WL_DISPLAY_ERROR, res, WL_DISPLAY_ERROR_INVALID_OBJECT,"This error will be ignored"); or wl_resource_post_event(res, WL_DISPLAY_ERROR, NULL, WL_DISPLAY_ERROR_INVALID_OBJECT,"This error will be ignored"); am I right ?
On 6 January 2014 14:59, Marek Ch <[email protected]> wrote: > The call is wrong, I posted it here: > http://lists.freedesktop.org/archives/wayland-devel/2013-November/012141.html > But without any reaction. Good that somobody else renewed it :) > > On 05/01/2014, Quentin Glidic <[email protected]> wrote: >> From: Quentin Glidic <[email protected]> >> >> Signed-off-by: Quentin Glidic <[email protected]> >> --- >> >> I do not know if this call is wrong of this the test just reveals a bug but >> without this, the wl_resource_post_event_array is called with random values >> >> tests/resources-test.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tests/resources-test.c b/tests/resources-test.c >> index d7a428a..2428964 100644 >> --- a/tests/resources-test.c >> +++ b/tests/resources-test.c >> @@ -108,7 +108,7 @@ TEST(destroy_res_tst) >> wl_resource_add_destroy_listener(res, &destroy_listener); >> >> /* without implementation this should be ignored .. */ >> - wl_resource_post_event(res, 0); >> + wl_resource_post_event(res, 0, 0, 0, 0, 0); >> >> id = wl_resource_get_id(res); >> link = wl_resource_get_link(res); >> -- >> 1.8.5.2 >> >> _______________________________________________ >> wayland-devel mailing list >> [email protected] >> http://lists.freedesktop.org/mailman/listinfo/wayland-devel >> > _______________________________________________ > wayland-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
