<div dir="ltr"><div class=""><img class="" id=":246" src="https://mail.google.com/mail/u/0/images/cleardot.gif" alt="">On Mon, Aug 11, 2014 at 8:39 AM, Pekka Paalanen <span dir="ltr"><<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>></span> wrote</div>
<div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
</div>No, I do not think that is wrong, but are you not writing language<br>
bindings or a wrapper library, which means you do not know how your code<br>
will be used?<br></blockquote><div><br></div></div><div>Yes, I'm writing C++ Bindings. These bindings don't expose the user_data at all,<br>because in C++ you can assign class member functions (or even lambda<br>
closures) as event handlers, which have access to their class instance without<br>
the need of a user user data void pointer. Therefore, the user should not be able<br></div><div>to mess with it. ;)<br></div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I still do not understand why you would ever really need to check if<br>
user_data is set on a proxy or not. When you create a wl_proxy by<br>
sending a request, I would suggest to always set user_data, so it will<br>
never be unset by you. For events, you know, that a new_id in an event<br>
will always be a new wl_proxy and the user_data is unset, so you can<br>
unconditionally set it. Again, never unset by you. Would that also help?<br></blockquote><div><br></div></div>Yes. Actually I'm doing exactly this as at the moment. :)<br><br></div>