apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: Q: apr_procattr_xxx() API (was: cvs commit: apr/include apr_thread_proc.h)
Date Mon, 14 Jun 2004 15:29:22 GMT
On Mon, Jun 14, 2004 at 09:19:33AM -0600, Brad Nicholes wrote:
>    Is there a reason why the apr_procattr APIs were implemented as 
> 
> apr_procattr_xxx_set (apr_procattr_t*, value)
> 
> rather than
> 
> apr_procattr_set (apr_procattr_t*, APR_xxx_ATTR, value, ...)

Because the different accessors take different numbers and type sof
parameters, you'd literally have to use "..." and varargs there, which
loses type-safety, and...

> It seems like the second approach would make it easier for a platform
> to extent the apr_procattr_t structure without having to add a new API
> each time, just to have the new API become a no-op for every other
> platform.  

...is certainly more effort than having to copy'n'paste an APR_ENOTIMPL
stub a few times.

joe

Mime
View raw message