apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject which is *arg1 in docs first or second?
Date Tue, 22 Jan 2002 08:58:48 GMT
Hi,

The apr apr_file_io.h header file uses arg1 to reference to an argument 
of the function. It's very confusing, since it's not clear whether it 
refers to the the first argument (human count) or the second (counting 
from 0 in C). e.g.:

apr_file_io.h:

/**
  * duplicate the specified file descriptor.
  * @param new_file The structure to duplicate into.
  * @param old_file The file to duplicate.
  * @param p The pool to use for the new file.
  * @remark *arg1 must point to a valid apr_file_t, or point to NULL
            ^^^^^
  */
APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
                                       apr_file_t *old_file,
                                       apr_pool_t *p);

and in two more places in this file, other .h files seem not to have a 
ref to arg1.

I think it's better to use the named argument in this case, e.g.

  * @remark *new_file must point to a valid apr_file_t...

Thanks.
_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Mime
View raw message