Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-25 Thread Nils Chr. Brause
I guess we can also remove similar lines from > > wl_display_connect_to_fd then? > > > I think this should be in a separate patch, but let's see what say the > others. Comeing back from holidays and seeing that nobody else seems to have commented on this, I prepared a new patch

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-12 Thread Nils Chr. Brause
On Mon, Aug 11, 2014 at 7:36 PM, Pekka Paalanen wrote: > Which brings us back to my earlier question, now rephrased > differently: are you going to forbid using the same Wayland > connection with a 3rd party library? > > If yes, you're all good. ;-) > Yes. :) One of the goals of my bindings are

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-12 Thread Marek Chalupa
t;flags = 0; > > > > > > > The same. > > > > Yes, of course. I guess we can also remove similar lines from > wl_display_connect_to_fd then? I think this should be in a separate patch, but let's see what say the others. > New patch including this: >

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-11 Thread Pekka Paalanen
On Mon, 11 Aug 2014 18:12:20 +0200 "Nils Chr. Brause" wrote: > On Mon, Aug 11, 2014 at 8:39 AM, Pekka Paalanen wrote > > > No, I do not think that is wrong, but are you not writing language > > bindings or a wrapper library, which means you do not know how your code > > will be used? > > > >

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-11 Thread Nils Chr. Brause
On Mon, Aug 11, 2014 at 8:39 AM, Pekka Paalanen wrote > No, I do not think that is wrong, but are you not writing language > bindings or a wrapper library, which means you do not know how your code > will be used? > Yes, I'm writing C++ Bindings. These bindings don't expose the user_data at all

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-11 Thread Nils Chr. Brause
tch including this: >From ec5eff0720efd90e868711a9b58bf1a435d156ce Mon Sep 17 00:00:00 2001 From: "Nils Chr. Brause" Date: Fri, 8 Aug 2014 18:06:16 +0200 Subject: [PATCH] wayland-client: Initialize newly created wl_proxys to zero. Up until now, newly created wl_proxys (with proxy_

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-10 Thread Pekka Paalanen
On Sun, 10 Aug 2014 15:59:08 +0200 "Nils Chr. Brause" wrote: > On Sat, Aug 9, 2014 at 3:14 PM, Pekka Paalanen wrote: > > > But I do wonder, if it ever makes sense to check user data for > > NULL, and set if it is NULL. If user_data is NULL, how can you > > ever be sure, that the wl_proxy was cr

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-10 Thread Marek Chalupa
a memset, you should > > also remove the explicit NULL sets. > > > > I agree. Here a new patch: > > From 685959fb80e6a1b10b2230efb331996bc38838ed Mon Sep 17 00:00:00 2001 > From: "Nils Chr. Brause" > Date: Fri, 8 Aug 2014 18:06:16 +0200 > Subject: [PAT

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-10 Thread Nils Chr. Brause
On Sat, Aug 9, 2014 at 3:14 PM, Pekka Paalanen wrote: > I see nothing wrong here, memset to zero is a usual pattern, and > wl_proxy is a complex enough type, that checking every member is > set is tedious. Therefore: > > Reviewed-by: Pekka Paalanen > Thanks! > But I do wonder, if it ever make

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-10 Thread Nils Chr. Brause
a new patch: >From 685959fb80e6a1b10b2230efb331996bc38838ed Mon Sep 17 00:00:00 2001 From: "Nils Chr. Brause" Date: Fri, 8 Aug 2014 18:06:16 +0200 Subject: [PATCH] wayland-client: Initialize newly created wl_proxys to zero. Up until now, newly created wl_proxys (with proxy_create o

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-09 Thread Jasper St. Pierre
On Fri, Aug 8, 2014 at 12:31 PM, Nils Chr. Brause wrote: > Up until now, newly created wl_proxys (with proxy_create or > wl_proxy_create_for_id) are not initialized properly after memory > allocation. The wl_display object in contrast is. To prevent giving > uninitialized data to the user (e.g. u

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-09 Thread Pekka Paalanen
On Fri, 08 Aug 2014 18:31:25 +0200 "Nils Chr. Brause" wrote: > Up until now, newly created wl_proxys (with proxy_create or > wl_proxy_create_for_id) are not initialized properly after memory > allocation. The wl_display object in contrast is. To prevent giving > uninitialized data to the user (e.

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-08 Thread Nils Chr. Brause
On 08/08/2014 07:23 PM, Marek Chalupa wrote: > Just out of curiosity, did you have some troubles because of non-setting the > proxy to zeroes? I wanted to check if I already assigned my meta data to the proxy be testing user_data against NULL. I have a workaround for this now, but I don't want any

Re: [PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-08 Thread Marek Chalupa
Just out of curiosity, did you have some troubles because of non-setting the proxy to zeroes? On 8 August 2014 18:31, Nils Chr. Brause wrote: > Up until now, newly created wl_proxys (with proxy_create or > wl_proxy_create_for_id) are not initialized properly after memory > allocation. The wl_di

[PATCH] wayland-client: Initialize newly created wl_proxys to zero.

2014-08-08 Thread Nils Chr. Brause
Up until now, newly created wl_proxys (with proxy_create or wl_proxy_create_for_id) are not initialized properly after memory allocation. The wl_display object in contrast is. To prevent giving uninitialized data to the user (e.g. user_data) an appropriate memset has been added. Signed-off-by: Nil