apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edmund Wong ...@kdtc.net>
Subject apr_pools.h docstring help
Date Thu, 07 May 2009 13:47:15 GMT

I am in the process of learning C and Subversion's internals
and as a prerequisite, I need to understand apr and its pools.

That stated, reading on the apr_pools.h file, I've come across
a docstring that I hope someone here can clarify.

Given the following declaration:

     APR_DECLARE(apr_pool_t *) apr_##type##_pool_get \
         (const apr_##type##_t *the##type)

In the docstring above it, it says:

APR_POOL_DECLARE_ACCESSOR() is used in a header file to declare the
  * accessor function. A typical usage and result would be:
  * <pre>
  * becomes:
  *    APR_DECLARE(apr_pool_t *) apr_file_pool_get(apr_file_t *ob);
  * </pre>

Shouldn't APR_POOL_DECLARE_ACCESSOR(file) become

APR_DECLARE(apr_pool_t *) apr_file_pool_get(apr_file_t *thefile); ?

In other words:


If that isn't the case, then can someone spare some time
to clarify why *the##type  becomes *ob?



View raw message