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..


_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to