apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: svn commit: r368769 - /apr/apr/trunk/include/apr_file_io.h
Date Fri, 13 Jan 2006 20:20:43 GMT
mturk@apache.org wrote:
> 
> URL: http://svn.apache.org/viewcvs?rev=368769&view=rev
> Log:
> Mark pool param for apr_file_remove and apr_file_rename
> as unused (because it is).
> Perhaps some day it will be removed from the API.

>  /**
>   * Delete the specified file.
>   * @param path The full path to the file (using / on all systems)
> - * @param pool The pool to use.
> + * @param pool Unused (can be anything).

WTF?!?  It's a POOL.  It cannot be anything.  You are breaking future platforms
by misguiding developers.

Win32 today crafts unicode filenames on the stack.  More efficient would be per
thread pool translate-name caches (created and linked by an apr_pool_datum
identifier).

In any case, the commit is invalid.  If you want to @bug those doxygen entries,
with a note 'Argument 'pool' is presently unused, on all platforms' - then that
would be fine.

What's the motivation behind misleading developers to toss any arbitrary data at
this argument?  At least if you had said (may be NULL), which I'm not suggesting
we do, then future changes which required a pool would crash predictably instead
of somewhat randomly.

Bill

Mime
View raw message