[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r39219 - trunk/subversion/libsvn_subr

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 22 Sep 2009 02:51:08 -0400

On Tue, Sep 22, 2009 at 02:48, Joe Swatosh <joe.swatosh_at_gmail.com> wrote:
> No worries about the breakage, this is by far not the biggest issue there.
> The Ruby bindings tests assert a lot of behavior of various APIs, not just
> the bindings themselves (which is one of the reasons the are so often
> reporting failures).
> Usually, I read the doc string before sending an email to the list to check
> if the asserted behavior is documented, not just a result of the current
> implementation (sorry I skipped that step this time).  Reading it now:
> /** Examine utf8-encoded @a file to determine if it can be described by a
>  * known (as in, known by this function) Multipurpose Internet Mail
>  * Extension (MIME) type.  If so, set @a *mimetype to a character string
>  * describing the MIME type, else set it to @c NULL.
>  *
>  * If not @c NULL, @a mimetype_map is a hash mapping <tt>const char *</tt>
>  * filename extensions to <tt>const char *</tt> MIME types, and is the
>  * first source consulted regarding @a file's MIME type.
>  *
>  * Use @a pool for any necessary allocations.
>  *
>  * @since New in 1.5.
>  */
> ...it doesn't specifically state that the file must exist (although saying that
> the file is utf8-encoded might imply it does?).  Ah, but when the mimetype_map
> is supplied it only checks the extension.  Okay, I think I get it.  I'll remove
> that assertion.

How about clarifying the docstring, too? That would help to prevent
future, similar problems.


Received on 2009-09-22 08:51:21 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.