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

Reply via email to