[PATCH wayland] wl_strtol and wl_strtoul utility functions are added (inlined patch)
Bill Spitzak
spitzak at gmail.com
Wed Oct 15 12:38:53 PDT 2014
You might be able to remove the base argument, is anybody using that?
That would remove confusion over which is the base and return argument
Also it seems like calling code would be easier to read with a version
that returns the value but puts the error into errno. Something like this:
value = wl_strtol (string, NULL);
if (errno) { string_was_bad (); }
Of course that means it is easier to ignore errors.
In general the idea seems good. Is there any precedent for such
functions, maybe one already exists?
On 10/15/2014 12:01 PM, Imran Zaman wrote:
> The reason is that strtol is used at many places in weston/wayland..
> and its not covering all the error cases everywhere.. so its better to
> encapsulate it in a function which i did..
More information about the wayland-devel
mailing list