Re: [PATCH 05/51] core: helper function for converting cairo_status_t to human-readable text (like strerror)

Bryce Harrington <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Fri, Dec 18, 2015 at 09:36:29PM +0100, Enrico Weigelt, metux IT consult wrote:
> On 18.12.2015 20:44, Bill Spitzak wrote:
> > I was figuring that functions are not supposed to ever return
> > LAST_STATUS as an error, so it is just as wrong as returning
> > LAST_STATUS+1 and should display in a similar way.
> 
> hmm, I dont really have an oppinion on that. Would it make any
> practical difference ?
> 
> The function is just meant for debug outputs, so one does not need
> to look up the enum values manually.

The function is defined as returning a const char*, so printing a
textual string rather than a number is what it should be doing.

Getting the numeric value of an enum parameter instead of a readable
name is rarely the problem you're dealing with during debugging.
Usually it's the opposite.  :-)

> --mtx
> 
> --
> Enrico Weigelt,
> metux IT consulting
> +49-151-27565287
> -- 
> cairo mailing list
> [email protected]
> http://lists.cairographics.org/mailman/listinfo/cairo
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.