[PATCH wayland] wl_strtol and wl_strtoul utility functions are added

Imran Zaman imran.zaman at gmail.com
Wed Nov 5 07:26:43 PST 2014


I have already taken off that patch from the patchwork list...

and pushed a simpler version...
http://lists.freedesktop.org/archives/wayland-devel/2014-November/018030.html

BR
imran

On Wed, Nov 5, 2014 at 5:08 PM, Pekka Paalanen <ppaalanen at gmail.com> wrote:

> On Wed, 15 Oct 2014 22:04:46 +0300
> Imran Zaman <imran.zaman at gmail.com> wrote:
>
> > The reason is that strtol is used at many places in weston/wayland..
> > and its not covering all the error cases everywhere (i.e. its buggy)..
> > so its better to
> > encapsulate it in a function with all the input and output checks...
> > it can be moved to weston if its sound such a big deal...
>
> libwayland-* are not generic utility libraries. We will not export this
> kind of functions, even if it might seem useful on a first glance.
> Libwayland is not a bucket where you throw everything you can imagine
> to be useful also elsewhere.
>
> Internal helpers would be a different matter.
>
> > On Wed, Oct 15, 2014 at 9:42 PM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> > > I don't see how this belongs in libwayland.  Sure, we use strtol
> twice, but
> > > I don't think that warrants adding 100 lines of wrapper functions and
> test
> > > cases.
> > > --Jason Ekstrand
> > >
> > > On Wed, Oct 15, 2014 at 6:16 AM, Rémi Denis-Courmont <remi at remlab.net>
> > > wrote:
> > >>
> > >> Le 2014-10-15 16:14, Imran Zaman a écrit :
> > >>>
> > >>> Hi
> > >>>
> > >>> The patch is used to replace strtol and strtoul with wl_strtol and
> > >>> wl_strtoul with inputs and result checks.
> > >>
> > >>
> > >> I don't know where Wayland developers stand on this, but I would
> rather
> > >> the client library function calls not clobber errno to zero.
>
> Yeah, that's probably a good rule.
>
>
> Thanks,
> pq
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20141105/bd9e6810/attachment.html>


More information about the wayland-devel mailing list