apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: [PATCH] vformatter formatting apr_status_t
Date Wed, 06 Jul 2005 15:15:14 GMT
On 7/5/05, Joe Orton <jorton@redhat.com> wrote:
> Since 1.2.0 already adds one of these, why not another...
> 
> glibc has a %m format string which is which expands to strerror(); this
> adds an equivalent %%pm which takes a pointer to an apr_status_t and
> prints the appropriate error string for that error code.
> 
> This is really nice to use on error paths, where you can collapse the
> typical "apr_psprintf + apr_strerror into a stack buffer" sequence into
> a single apr_psprintf call with no stack buffer needed.
> 
> Objections?

no, looks very useful

Mime
View raw message