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

svn_dirent_t.size API inconsistency

From: Stefan Fuhrmann <stefan2_at_apache.org>
Date: Thu, 21 Dec 2017 15:14:25 +0100

I think I found an API documentation bug.
svn_types.h specifies for svn_dirent_t.size:

   /** length of file text, or 0 for directories */
   svn_filesize_t size;

However, (almost?) all implementations set it to
SVN_INVALID_FILESIZE for directories. This is also
what we do for svn_io_dirent_t.size.

I discovered this as r1818578 broke our Perl tests.
The same test makes it clear that no API user could
have successfully used the API as documented.

Therefore, I suggest to change the API doc to match
the implementation, check the code for consistency
and add an entry to our errata list.

-- Stefan^2.
Received on 2017-12-21 15:14:38 CET

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