apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@apache.org>
Subject Re: [PATCH] vformatter formatting apr_status_t
Date Wed, 06 Jul 2005 12:55:21 GMT

On Jul 5, 2005, at 12:10 PM, Joe Orton 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?
>

Nope, +1

Mime
View raw message