You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Daniel Sahlberg <da...@gmail.com> on 2025/08/08 11:06:25 UTC
Updating doxygen tags
Hi,
I'm preparing some updates to the documentation and since I'm not so
experienced in C I'd like to ask before I make a stupid mistake.
In include/apr_thread_proc.h there typedef apr_child_errfn_t. The first
parameter is called "pool" in the docstring but called "proc" in the actual
declaration. I think "pool" is a more logical name.
As far as I understand it, changing the parameter name shouldn't have a
difference in the published API. Is this correct?
[[[
Index: include/apr_thread_proc.h
===================================================================
--- include/apr_thread_proc.h (revision 1927687)
+++ include/apr_thread_proc.h (working copy)
@@ -171,7 +171,7 @@
* @param err APR error code describing the error
* @param description Text description of type of processing which failed
*/
-typedef void (apr_child_errfn_t)(apr_pool_t *proc, apr_status_t err,
+typedef void (apr_child_errfn_t)(apr_pool_t *pool, apr_status_t err,
const char *description);
/** Opaque Thread structure. */
]]]
Agree that pool is a better name?
Cheers,
Daniel
Re: Updating doxygen tags
Posted by Daniel Sahlberg <da...@gmail.com>.
Den fre 8 aug. 2025 kl 17:53 skrev Ruediger Pluem <rp...@apache.org>:
>
>
> On 8/8/25 1:06 PM, Daniel Sahlberg wrote:
> > Hi,
> >
> > I'm preparing some updates to the documentation and since I'm not so
> experienced in C I'd like to ask before I make a stupid mistake.
> >
> > In include/apr_thread_proc.h there typedef apr_child_errfn_t. The first
> parameter is called "pool" in the docstring but called
> > "proc" in the actual declaration. I think "pool" is a more logical name.
> >
> > As far as I understand it, changing the parameter name shouldn't have a
> difference in the published API. Is this correct?
>
> This would be my understanding as well.
>
> >
> > [[[
> > Index: include/apr_thread_proc.h
> > ===================================================================
> > --- include/apr_thread_proc.h (revision 1927687)
> > +++ include/apr_thread_proc.h (working copy)
> > @@ -171,7 +171,7 @@
> > * @param err APR error code describing the error
> > * @param description Text description of type of processing which
> failed
> > */
> > -typedef void (apr_child_errfn_t)(apr_pool_t *proc, apr_status_t err,
> > +typedef void (apr_child_errfn_t)(apr_pool_t *pool, apr_status_t err,
> > const char *description);
> >
> > /** Opaque Thread structure. */
> > ]]]
> >
> > Agree that pool is a better name?
>
> Yes.
>
> Regards
>
> Rüdiger
>
Thanks to both Brane and Rüdiger for the quick review. As you may have
seen, I committed this in r1927700 along with a bunch of "obvious fixes".
There are still quite a lot of warnings about undocumented parameters but
they were not so obvious so I left them alone at this time.
Cheers,
Daniel
Re: Updating doxygen tags
Posted by Ruediger Pluem <rp...@apache.org>.
On 8/8/25 1:06 PM, Daniel Sahlberg wrote:
> Hi,
>
> I'm preparing some updates to the documentation and since I'm not so experienced in C I'd like to ask before I make a stupid mistake.
>
> In include/apr_thread_proc.h there typedef apr_child_errfn_t. The first parameter is called "pool" in the docstring but called
> "proc" in the actual declaration. I think "pool" is a more logical name.
>
> As far as I understand it, changing the parameter name shouldn't have a difference in the published API. Is this correct?
This would be my understanding as well.
>
> [[[
> Index: include/apr_thread_proc.h
> ===================================================================
> --- include/apr_thread_proc.h (revision 1927687)
> +++ include/apr_thread_proc.h (working copy)
> @@ -171,7 +171,7 @@
> * @param err APR error code describing the error
> * @param description Text description of type of processing which failed
> */
> -typedef void (apr_child_errfn_t)(apr_pool_t *proc, apr_status_t err,
> +typedef void (apr_child_errfn_t)(apr_pool_t *pool, apr_status_t err,
> const char *description);
>
> /** Opaque Thread structure. */
> ]]]
>
> Agree that pool is a better name?
Yes.
Regards
Rüdiger
Re: Updating doxygen tags
Posted by Branko Čibej <br...@apache.org>.
On 8. 8. 25 13:06, Daniel Sahlberg wrote:
> Hi,
>
> I'm preparing some updates to the documentation and since I'm not so
> experienced in C I'd like to ask before I make a stupid mistake.
>
> In include/apr_thread_proc.h there typedef apr_child_errfn_t. The
> first parameter is called "pool" in the docstring but called "proc" in
> the actual declaration. I think "pool" is a more logical name.
Looks like a typo, yes. "pool" seems more correct.
> As far as I understand it, changing the parameter name shouldn't have
> a difference in the published API. Is this correct?
Yes. In C, the names, types or indeed the number of parameters do not
affect linking, and the names do not affect the ABI.
> [[[
> Index: include/apr_thread_proc.h
> ===================================================================
> --- include/apr_thread_proc.h (revision 1927687)
> +++ include/apr_thread_proc.h (working copy)
> @@ -171,7 +171,7 @@
> * @param err APR error code describing the error
> * @param description Text description of type of processing which failed
> */
> -typedef void (apr_child_errfn_t)(apr_pool_t *proc, apr_status_t err,
> +typedef void (apr_child_errfn_t)(apr_pool_t *pool, apr_status_t err,
> const char *description);
>
> /** Opaque Thread structure. */
> ]]]
>
> Agree that pool is a better name?
+1
>
> Cheers,
> Daniel
>